Makers Byte
Published in

Makers Byte

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.

Custom Numeric Pagination for WordPress Theme
by Luis daniel rovira

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.

Manual Method:

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.

Third-Party Plugins:

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!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store