Tagged: post navigation
We are creating a highly customized version of your theme for a client and I need to know where the code for the previous and next post is stored. We need to two only show previous and next in the same category? Right now if you are in a custom property listed for like real estate, when you get to the last property it will show the next post in the news.
The function can be found in functions-coherence.php:
$output = "";
<div class='post_nav_container stretch_full'>
<?php previous_post_link('<span class="previous_post_link">← %link </span><span class="post_link_text">'.__('(previous entry)','avia_framework'))."</span>"; ?>
<?php next_post_link('<span class="next_post_link"><span class="post_link_text">'.__('(next entry)','avia_framework').'</span> %link →</span>'); ?>
</div> <!-- end navigation -->
$output = ob_get_clean();
I checked the documentation: http://codex.wordpress.org/Function_Reference/previous_post_link and it seems like you can restrict it to the current category with a parameter. However it won’t work with custom post types (including the portfolio).
The topic ‘Previous and Next Post Navigation’ is closed to new replies.