Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 2 down vote accepted
You can use Ambrosite Next/Previous Post Link Plus(wordpress.org/extend/plugins/…) plugin for doing this.

Glad it worked for you :). Can you vote up for this

share|improve this answer
add comment

Your Answer

 
discard

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.