I am currently upgrading my theme (iA3) to a new version and am trying to redo a few customizations that were done for me to the old version.
I would like the next and previous links on a page to only show posts within the same category ‘portfolio’.
I have done some searching and found this code:
<?php next_post_link('%link', 'Next post in category', TRUE); ?>
But I can’t sort out where the TRUE parameter goes in the code below as it is formatted differently. Nothing seems to work.
<ul> <?php if(get_previous_post()): ?> <li><?php previous_post_link('%link', __('« Previous', 'ia3')); ?></li> <?php else: ?> <li><?php _e('« Previous', 'ia3'); ?></li> <?php endif; ?> <?php edit_post_link(__('Edit', 'ia3'), '<li>', '</li>'); ?> <?php if(get_next_post()): ?> <li><?php next_post_link('%link', __('Next »', 'ia3')); ?></li> <?php else: ?> <li><?php _e('Next »', 'ia3'); ?></li> <?php endif; ?> </ul>
Any ideas where I would add the ‘TRUE’ parameter to this new code so only posts from the same category show when clicking next or previous?
I appreciate anyone that has read this far and any help you can provide.
- The topic ‘Trouble adding TRUE parameter for next/previous posts’ is closed to new replies.