How to Improve WordPress Navigation with WP-PageNavi

By Lisa Sabin-Wilson

To create page navigation links below your WordPress site posts and archive listings for sites that have numbered pages, you need to install the WP-PageNavi plugin. Adjust the WP-PageNavi plugin settings to your liking. The default settings are shown here.

WP-NaviPage plugin
Adjust the WP-PageNavi settings.

This plugin provides a better user experience for your readers by making it easier for them to navigate through your content; it also allows search engines to go through your web page easily to index your pages and posts. After you install and activate the plugin, you need to insert the following code into your Main Index template (index.php) or any template your theme uses to display archives (such as a blog page, category page, or search page):

<?php wp_pagenavi(); ?>

The wp_pagenavi(); template tag needs to be added on a line directly after The Loop.

You can experiment with where you want to place the wp_pagenavi() code in your template file to give you the look and feel you want. Additionally, you can control the look of the plugin by providing styling in your CSS (style.css) theme file for the WP-PageNavi plugin display, or you can have the plugin insert its default CSS into your regular CSS by deselecting the Use Pagenavi.css? option.