• I want the posts of a specific category to show links of next and previous post of same category only instead of natural chronological order.
    I searched for solutions for this issue but they came like this
    previous_post_link( ‘%link’, ‘Prev post in category’, true );
    next_post_link( ‘%link’, ‘Next post in category’, true );.
    but for this theme
    Following source code was present in single.php

    <?php get_header(); ?>
    <div class=”mh-wrapper mh-clearfix”>
    <div id=”main-content” class=”mh-content” role=”main” itemprop=”mainContentOfPage”><?php
    while (have_posts()) : the_post();
    mh_before_post_content();
    get_template_part(‘content’, ‘single’);
    mh_after_post_content();
    comments_template();
    endwhile; ?>
    </div>
    <?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>

    Please advise ,what changes I need to make. Thanks
    Btw I am total noob in these topics.

    • This topic was modified 3 years, 5 months ago by tanixtx3.
  • The topic ‘Next/previous post links for same category only.’ is closed to new replies.