WordPress.org

Ready to get started?Download WordPress

Forums

Need a little help for WP-PageNavi to install in twenty thirteen (2 posts)

  1. Chester
    Member
    Posted 12 months ago #

    Hi, i am new to WordPress and not a coder. I am using twenty thirteen child theme. Need a little help for WP-PageNavi to install it in my theme. Found no documentation for twenty thirteen in their support forum. Also asked about it in their forum. But no one replied. Can any one tell how to install it in twenty thirteen. Waiting some one to reply eagerly. Thanks

  2. Chester
    Member
    Posted 12 months ago #

    I found the solution. Got the code

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

    in line no 268 in my functions.php file in twenty thirteen theme which is to be replaced with <?php wp_pagenavi(); ?> according to its documentation. but i had to replace the whole block of code looks like

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

    i just wants to ask is there any problem to replace the whole block?

Reply

You must log in to post.

About this Topic