How to show Page Numbers in WordPress footer navigation?

How to show Page Numbers in WordPress footer navigation?

Most of the WordPress themes show “Previous Post” and “Next Post” to navigate through the blog posts at the footer as WordPress does not have any built-in function on page numbering. But page numbers instead of next and previous links let users to navigate quicker (jump between the pages) easily. Here is an article on page number plugins and how to use them.

Plugins I use to show WordPress Page Numbers

How to use plugins to show Page Numbers

All the above mentioned plugins are very easy to use. Install and activate the plugin. Then customize the plugin from Settings option. Once you have done it, you need to add a piece of code at footer.php file. You can access the file via Dashboard > Appearance > Editor, replace next_posts_link() and previous_posts_link() with the following code and save the changes clicking Update File button.

For WP Page Numbers

<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>

For WP-PageNavi

<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>

For WP Paging

<?php if(function_exists('wp_paging')) { wp_paging(); } ?>

Hopefully you will add page number in your blog easily. However, you can always discuss your problem with us. Just leave a comment and we will try to find a fix for you.

By | On Saturday, July 10th, 2010 | Under How To's, Plugins | 10 Comments ยป


Contact our experts, most of the time we assist our readers free of charge.

Those who found this page were searching for:

  • show numbers for next wordpress
  • wordpress%20nav-below%20page%20number
  • show number of page wordpress
  • wp pagenavigation in numbers
  • wordpress page numbers code
  • wordpress previous next in footer
  • page number code for wordpress
  • how do i find a page number in a wordpress website
  • how to add numerical page navigation in wordpress
  • wp page numbers
  • cat

    Is there a way to show the page number on index page and homepage, automatically arrange 10 posts on each page? It would be better to do without a plugin. Anyone knows how? thanks!

  • mega

    i dont look footer.php file, how can i insert page navi?

  • WP-PageNavi plugin is really awesome, it works like a charm !

  • I just want to say that I have been searching the web for MONTHS, no one’s instructions worked for my blog except for yours. I downloaded the WP-PageNavi although wordpress says it’s not optimized to work with my version of wordpress. But it actually does work with no problems.. And the code was already in it. Cept to edit the code I would of had to go into the THEME FUNCTIONS. php file instead of the footer file. You should definitely update that info.

  • E

    This is a really silly question but once activated how do I use the plugin? If I create several posts/pages how do I get the page numbers showing .

    Need help?


  • nae

    hello i can not find next_posts_link() and previous_posts_link() in the footer.php my theme is built with artistseer.

  • Arif karim

    use WP-PageNavi plugin.

    No!!! work on my theme.

    problem is that:

    >> i could not found two of this function in my theme that you tell.
    >> please tell me that where i embed this code and how can i solve it ?


  • Good tutorial!

    Pagination is really helpful for blog readers for navigation. I have few questions.

    – Among all these 3 plugins, which one is the best?
    – Is there a way to escape webmaster tool duplicate page issue created because of pages like blog/page/2.. ?


    • Administrator

      Hello Ron,

      Let me try to answer your questions:

      1. I’m not going to say which plugin is the best, as it depends on your requirements and features they provide. If you are semi-professional blogger (+coder), even they don’t give you some features, you can still get it tweaking the plugin. However, Pagenavi is widely used plugin for the purpose.

      2. Use “nofollow” on page number links and also use canonical (

      Thanks for your comment.

Previous post:

Next post: