This is a quick tutorial on “How to add or customize WordPress Page Navigation in website templates?”
Some of the WordPress themes don’t have proper page navigation system in built. Like the theme that I am using it was showing “Older post” and “New Post” text links by default in page navigation. It’s not bad, but I like the number pagination more than text links.
You can see on my blog that I am using number page navigation now. I have replaced the default pagination with new one. New pagination is cool and more productive from user point of view.
In this post I am going to show you how I have replaced older pagination with new number pagination.
Find Page Navigation Plugin:
To add or to replace default pagination you first need to find Page Navigation Plugin. I will recommend Easy WP Page Navigation this is the best and easy to use and customize plugin that I have used on my blog.
There are lots of other plugins too that will allow you to do the same. It depends on you which plugin you want to use. You can search for plugins on wordpress.org.
- Best WordPress SEO plugins for Better Content Optimization
- Jetpack WordPress All in One Plugin Overview
Easy WP Page Navigation Plugin Setup:
Setup process for this plugin is really simple and quick. It will just take few minutes.
- Search plugin in wordpress.org and download or Go to Plugin > Add New in your WordPress dashboard and search for the plugin “Easy WP Page Navigation”
- Install and activate plugin
- Now find the plugin under Settings, setup page navigation setting according to your website and save all changes you made.
- To add new wordpress page navigation to your website you need to add short php code in to your website code.
The php short-code for Easy WP Page Nav is
<?php echo easy_wp_pagenavigation(); ?>
You can also get this code from Easy WP Page Nav plugin installation page.
Now to add code in website, open your index.php file and look for default page navigation code and replace it with new php code.
In my case the default navigation code (Pro Theme) was like this:
<div class="btn btn-style pull-left"><?php next_posts_link( '« Older Posts' ); ?></div>
<div class="btn btn-style pull-right"><?php previous_posts_link( 'Newer Posts »' ); ?></div>
After replacing the code save the file, now this will start showing new pagination on your website.
You can also check out the video tutorial below for reference this will help you to understand it quickly.
Check out our Youtube Channel here for more video tutorials.
Hope this tutorial will help you. If you still face any issue while adding page navigation to your website please let me know through comments. I will help you to fix the issue.