Custom Numeric Pagination for WordPress Theme
A snippet of code for adding custom numeric pagination to your WordPress Theme
Default WordPress themes display pagination links by adding “Older posts” and “Newer Posts” links at the bottom of your listing pages. However, there are many sites that require numeric pagination.
There are two methods to adding numeric pagination in your WordPress theme. The first method is manually adding numeric pagination without relying on a third party plugin.
To add numeric pagination in your WordPress theme by using the manual method. First thing you need to do add the snippet of code to functions.php:
Once added you will need to add the styling CSS code to your appearance > custom > CSS code:
Now use the function to your index/archive files.
To add numeric pagination in your WordPress theme by using a plugin called WP-PageNavi. First thing you need to do is install and activate WP-PageNavi plugin. After activating the plugin go to Settings » PageNavi to configure the plugin settings. Then use the function to install the pagination.
If you enjoyed this post…it would mean a lot to me if you could click on the “claps” icon…up to 50 claps allowed — Thank You!