How to Add Numbered Pagination System in WordPress Themes?
We all know that WordPress is the most widely used CMS (Content Management System) for Blogging. It has large numbers of themes available both as free and paid. Free wordpress themes are good but they have limited features and functionality as compared to paid one. I have seen that most free wordpress themes have difficulty to navigate from one page to another (especially the middle ones) as they lack numeric pagination. They only have ‘older posts’ and ‘newer posts’ link options to navigate. This is very frustrating if you have to reach to the last of the page or in between them.
Here is the default Pagination View in WordPress without numbers
Here is the easiest way to insert numbered pagination system in WordPress theme
First download this plugin called ‘Simple Pagination’ and upload and install it in your WordPress Blog.
After that Activate the Plugin by going to the Plugins menu in WordPress.
Go to your theme files and look for the file ‘loop.php’ or ‘archive.php’ or similar file where you want to put the pagination. Usually you want to put the page numbers in the front page and archive pages. So look for these file that control the archive and front page of your theme and then insert the code mentioned below in between the function calls to next_posts_link() and previous_posts_link(). You can also delete these calls afterwards if you do not want them but the code should be inserted between them only.
Usage for Posts
<?php if(function_exists(‘wp_simple_pagination’)) {
wp_simple_pagination();
} ?>
Usage for Comments
You can do the same thing in the comment.php file by inserting the following code
<?php if(function_exists(‘wp_simple_comments_pagination’)) {
wp_simple_comments_pagination();
} ?>
After that clear your wordpress cache and go to the front or archive pages. There you will the Page Numbers on the bottom as shown in the picture below.
Simple Pagination also has some extra options where you can customize the style and feel by CSS, set the pagenumbers, anchors etc.
Download Simple Pagination Plugin