Support » Theme: Flato » PREVIOUS and NEXT links by CATEGORY????

  • I see that this template has made a change to the Previous and Next links for posts and I have no idea how to unravel this mystery.

    I would like to be able to go to the next and previous posts within in a specific category. The whole point of taxonomy and categories is to keep areas separate. Currently, Flato is set up to ignore categories completely, so it will just jump through posts in chronological order based on publish date.

    WordPress shows this kind of code:

    <?php next_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ); ?>

    and the solution to my problem is supposed to be this:
    in_same_cat argument should be set to TRUE.

    Flato’s code is hidden away in a file called template-tags.php and looks like this instead:

    <?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '<i class="fa fa-chevron-left"></i> Previous Article', 'Previous Article', 'themememe' ) . '</span> %title' ); ?>
    <?php next_post_link( '<div class="nav-next">%link</div>', '<span class="meta-nav">' . _x( 'Next Article <i class="fa fa-chevron-right"></i>', 'Next Article', 'themememe' ) . '</span> %title' ); ?>

    How can I fix that to respect the categories?

  • The topic ‘PREVIOUS and NEXT links by CATEGORY????’ is closed to new replies.