I'm looking to exclude a category from the post navigation. Originally, I looked up manipulating <?php the_post_navigation(); ?>
to exclude categories, but a few posts I read (like this) pointed me towards using <?php previous_post_link(); ?>
and <?php next_post_link(); ?>
instead.
Here's what I've put together so far:
<div class="left col-6">
<h5>Previous Post</h5>
<small><?php previous_post_link('%link', '%title', $excluded_terms); ?> </small>
</div>
<div class="right col-6 text-right">
<h5>Next Post</h5>
<small><?php next_post_link('%link', '%title', $excluded_terms); ?> </small>
</div>
With $excluded_terms = '463';
The problem I'm running into is that this only cycles through ONE post category and excludes posts from this ONE category that are also in category 463. I'm trying to cycle through ALL post categories except category 463. Thoughts?
Thanks in advance!