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( '←', 'Previous post link', 'IQ' ) . '</span> %title', TRUE ); ?> <?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'IQ' ) . '</span>', TRUE ); ?>