how to add page number in wordpress

0
12

 

Image

 

While shipping most of wordpress themes doent carry page numbering. But we can bring this with a popular plugin and a little WP Coding. here is how it is

WP_Pagenavi Plugin is used for this paging

Once installed Activate the Plugin

Now the coding part

  • Goto Appearance->Editor
  • Select functions.php

locate these two lines

<div class=”nav-previous”><?php next_posts_link( __( ‘<span class=”meta-nav”>&larr;</span> Older posts’, ‘twentyten’ ) ); ?></div>
<div class=”nav-next”><?php previous_posts_link( __( ‘Newer posts <span class=”meta-nav”>&rarr;</span>’, ‘twentyten’ ) ); ?></div>

replace this two lines with

<?php wp_pagenavi(); ?>

Save functions.php

Return to site and check

LEAVE A REPLY

Please enter your comment!
Please enter your name here