[Resolved] post-nav stay in current category & loop

Home Forums Support [Resolved] post-nav stay in current category & loop

Home Forums Support post-nav stay in current category & loop

Viewing 16 post (of 16 total)
  • Author
    Posts
  • #1718448
    twarrior

    Hello,

    Just to share that in order to show posts navigation of the same category has worked for me both Tom’s post:

    add_action( 'after_setup_theme', 'tu_category_specific_post_navigation' );
    function tu_category_specific_post_navigation() {
        add_filter( 'generate_category_post_navigation', '__return_true' );
    }

    and this one from another website (I am not an affiliate):

    add_filter( 'generate_post_navigation_args', function( $args ) {
        $args['in_same_term'] = true;
        return $args;
    } );

    https://www.gmitropapas.com/generatepress-tips-and-tricks/blog/limit-post-navigation-to-the-current-category/

    PS: I come from Joomla, and sometimes I love WordPress, and other times (as in this case) I am surprised that WordPress itself does not have an option for something as basic as this in a CMS.

Viewing 16 post (of 16 total)
  • You must be logged in to reply to this topic.