Problem with previous_post_link and next_post_link
-
I am using the following lines of code in my single.php which is working great however I have 1 category that uses single.php that I do not want these to display on. I have no idea how to go about doing this.
<?php previous_post_link( '<div class="nav-prev">%link</div>', 'Previous', TRUE ); ?> <?php next_post_link( '<div class="nav-next">%link</div>', 'Next', TRUE ); ?>
I tried using this
<?php previous_post_link( '<div class="nav-prev">%link</div>', 'Previous', TRUE, '3'); ?> <?php next_post_link( '<div class="nav-next">%link</div>', 'Next', TRUE, '3'); ?>
but it is still displaying the links in the category with the ID of 3 which is the category I do not wish to display these links in. So now I am confused and do not know how to hide these links.
Can anybody help?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Problem with previous_post_link and next_post_link’ is closed to new replies.