Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #25073

    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:

    function avia_post_nav()
    $output = "";
    <div class='post_nav_container stretch_full'>
    <div class='post_nav'>
    <div class='previous_post_link_align'>
    <?php previous_post_link('<span class="previous_post_link">← %link </span><span class="post_link_text">'.__('(previous entry)','avia_framework'))."</span>"; ?>
    <div class='next_post_link_align'>
    <?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();
    return $output;

    I checked the documentation: 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).

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Previous and Next Post Navigation’ is closed to new replies.