WordPress pagination is generally best handled by plugins, rather than working with the previous and next buttons provided by the core. To achieve numbered pagination, WordPress plugin authors have created hundreds of plugins, although many are cumbersome and overly complicated. For many WordPress developers, there’s only one true winning plugin to provide numbered pagination at the bottom of your posts page: WP-PageNavi.
WP-PageNavi is simple to use and install. Unlike some plugins, even beginners will find the ease of installing the plugin refreshing. WP-PageNavi steps out of the way in terms of styling, allowing it be easily modified to match the style of any theme with just a few lines of CSS.
How To Install WordPress WP-PageNavi Pagination
- Log into WordPress then navigate to the Add New Plugin page (Plugins -> Add New).
- Search for “WP-PageNavi”.
- Install and activate the plugin.
- Add some options to the arguments parameter of your posts pages posts query (query_posts, WP_Query, etc). They are “posts_per_page” => 10 and “paged” = get_query_var(‘paged’).
- Add underneath the while loop:
- Enjoy the best WordPress pagination plugin! (and customize with custom CSS)