WordPress.org

Forums

WP-PageNavi
[resolved] Paging not working (3 posts)

  1. ngaisteve1
    Member
    Posted 11 months ago #

    Hi, my paging looks weird - http://akusihat.com/category/health-stories/page/2/

    How should I improve it?

    I changed from

    function twentytwelve_content_nav( $html_id ) {
    global $wp_query;

    $html_id = esc_attr( $html_id );

    if ( $wp_query->max_num_pages > 1 ) : ?>
    <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
    <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>

    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentytwelve' ) ); ?></div>
    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?></div>

    </nav><!-- #<?php echo $html_id; ?> .navigation -->
    <?php endif;
    }

    to

    function twentytwelve_content_nav( $html_id ) {
    global $wp_query;

    $html_id = esc_attr( $html_id );

    if ( $wp_query->max_num_pages > 1 ) : ?>
    <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
    <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>

    <div class="nav-previous"><?php wp_pagenavi(); ?></div>

    </nav><!-- #<?php echo $html_id; ?> .navigation -->
    <?php endif;
    }

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

  2. Lester Chan
    Member
    Plugin Author

    Posted 11 months ago #

    It is working but it looks weird so the title of this thread is inaccurate.

    The reason it looks weird is because the CSS is not loaded.

    Check Settings -> PageNavi, ensure that "Use pagenavi-css.css" is Yes

  3. ngaisteve1
    Member
    Posted 11 months ago #

    oh ic. it works now. i realize that home page shows

    twentytwelve_content_nav( 'nav-below' );

    i will try to fix it first. thanks.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.