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 have a magazine format where a parent category is an issue, sub categories are the sections and the articles go into their respective sections. When viewing an article in a magazine, I would like to be able to scroll through all the articles in that issue not just the section the articles are in or the whole website, just that issue.

ATM the links go through all of the articles in a section. How can I adapt the code below to make next/previous_post_link link through all of the articles within a magazine?

I know that the TRUE declaration in the code below lets the links cycle through all of the posts and changing it to FALSE makes it go through its parent category but how can you make this go through the top level category?.

code in single.php

<?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'IQ' ) . '</span> %title', TRUE ); ?>
        <?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'IQ' ) . '</span>', TRUE ); ?>
share|improve this question
You can use Ambrosite Next/Previous Post Link Plus(wordpress.org/extend/plugins/…) plugin for doing this. Hope it will solve your issue. – swtshweta Dec 6 '12 at 15:58
stick that as answer and ill gladly tick, thanks! – dodgerogers Dec 6 '12 at 19:00
up vote 3 down vote accepted

You can use Ambrosite Next/Previous Post Link Plus plugin for doing this.

share|improve this answer

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.