Add Fancy Pagination Links In WordPress

Are you looking to add fancy pagination links in WordPress? We can set numeric pagination for our blog. In this article, we show you how to add fancy pagination links in WordPress.

On our site, we are using the numeric pagination links as shown in the screenshot below.

Pagination Links

Why Need Fancy Pagination Links?

When we install WordPress, default themes show Older posts and Newer posts links. Most of the WordPress themes also show the same kind of links. Some premium themes use numeric pagination for the site. Numeric pagination links look better and more user-friendly compare to traditional links.

WordPress has a plugin called ‘WP-Pagenavi’ in their repositories. Using this plugin, we can add fancy pagination links in WordPress.

Add Fancy Pagination Links In WordPress Using WP-Pagenavi

Head over to the repository, download the plugin, and install it.

Once you activated the plugin, go to Settings->PageNavi page. On this setting page, You can configure all options. You can also keep default configurations as it is. Default configurations also work well.

Plugin Configuartion

Next, find the methods next_posts_link() and previous_posts_link() from the active theme directory. Replace the above methods with the single line below.

<?php wp_pagenavi(); ?>

Add Styling To Your Pagination Links

Pagination links generated using this plugin use the style from pagenavi-css.css file. This CSS file is located in the root directory of a plugin. The default styling of pagination links is quite good. But still, if you want to apply a different style for pagination links, then copy this CSS file in your theme directory and add your own styling. In this way, your changes will not override after updating the plugin.

Another way is to set the ‘Use pagenavi.css’ option to ‘No’ on the plugin’s setting page. And then add your styling in the theme’s ‘style.css’ file.

We hope you understand how to add fancy pagination links in WordPress. You may also want to read our related articles on How To Create Custom Login Form In WordPress.

If you liked this article, then please subscribe to our YouTube Channel for video tutorials.

1 thought on “Add Fancy Pagination Links In WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *