I am currently using toolbox as a parent theme and have created a template file called single-projects.php where all posts of the custom post type 'projects' are shown. The previous and next buttons work well but they show the next posts in the same 'projects' post type and I need them to be in the same taxonomy as well. The code for the previous/next links now looks like this:

<nav id="nav-below">
  <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'toolbox' ) . '</span> Previous Post' ); ?></div>
  <div class="nav-next"><?php next_post_link( '%link', 'Next Post <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'toolbox' ) . '</span>' ); ?></div>
</nav><!-- #nav-below -->

This post seemed the closest to what I need https://stackoverflow.com/questions/5775197/wordpress-get-pages-taxonomy-parameter but I could not get it to work. Is there a way to only link to posts in the same taxonomy?

1 Answer 1


This plugin will help you accomplish your goal: http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress

  • @Sarah glad it works for you. To mark this question as resolved, you can tick the box as answered.
    – user2015
    Commented Jul 28, 2011 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.