• Resolved Peck

    (@mar7inz)


    How do I make it so, if I’m on a a post that is owned by a category, only posts in that category, come up?

    Like if I’m on a post from Category A, only Category A posts come up in the > Next & < Previous buttons?

    Thank you.

    https://wordpress.org/plugins/wp-pagenavi/

    I’m a noob, so can you please point me to what file to edit from what directory. Thank you <3

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lester Chan

    (@gamerz)

    https://codex.wordpress.org/Category_Templates ? If you are using a theme, I suggest contact your theme author instead.

    Adam Pery

    (@adam1920)

    Use this:

    // Don't print empty markup if there's nowhere to navigate.
            $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
            $next     = get_adjacent_post( false, '', false );
    
            if ( ! $next && ! $previous )
                    return;
            ?>
            <nav class="navigation post-navigation" role="navigation">
                    <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>
                    <div class="nav-links">
    
                            <?php previous_post_link( '%link', _x( '<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'twentythirteen' ), true ); ?>
                            <?php next_post_link( '%link', _x( '%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'twentythirteen' ), true ); ?>
    
                    </div><!-- .nav-links -->
            </nav><!-- .navigation -->
            <?php

    Zariah

    (@z_facilityone)

    I updated my WP theme to the latest
    I also updated my WP-PageNavi Version 2.85

    This is what shows on my WP page:
    Page 1 of 31hPAGE_NUMBER%page largerhPAGE_NUMBER%page largerh!–nextpage–>nextpostslink

    very help soon.

    Can someone please help me?

    I’m also trying to use this plugin ONLY for one specific category.

    But I don’t know how to change the code or where to put that code that Adam posted above.

    Please speak in layman’s terms. I’m not really a developer, although I’m usually pretty good at figuring things out.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP-Navi plugin, navigating by category?’ is closed to new replies.