WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 http://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?

share|improve this question

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

share|improve this answer
This plugin worked great! Thanks for your help. – Sarah Jul 27 '11 at 19:51
@Sarah glad it works for you. To mark this question as resolved, you can tick the box as answered. – Piet Jul 28 '11 at 1:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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