Pagination is the technique of splitting a huge collection of data or information into smaller, more manageable chunks known as “pages.” This is often used in a variety of situations, such as websites, databases, and papers, to help consumers navigate and consume information.
Pagination is frequently used in web development to display a limited number of items or results on a single page, with navigation elements (such as “Previous” and “Next” buttons or page numbers) that allow users to navigate between multiple pages of material. When dealing with a huge number of objects, such as search results, articles, or products on an e-commerce website, this is especially handy. Pagination improves the user experience by lowering load time and giving a more structured method of accessing material.
For example, if a search engine produces 100 results, it may only show 10 on each page, and consumers would need to visit to other sites to see all the results. By doing this, too much information won’t be presented to the user at once.
What Is WordPress Pagination?
The technique of dividing a list of material into many pages in WordPress is known as pagination. This is done to make it easier for visitors to navigate enormous volumes of material and to enhance the website’s speed.
WordPress has pagination functionality that may be used to paginate posts, pages, and other sorts of material. Most themes’ default pagination system is simple and effective, but you may extend it with plugins to provide extra functionality and customization choices.
You can use one of the following approaches to Add Pagination in WordPress websites:
- Use the built-in pagination system: The simplest method for adding pagination to your website is this. To do this, select Reading from the Settings menu and modify the number of posts per page. Pagination will be added automatically by WordPress to your blog posts and pages.
- Use a pagination plugin: There are numerous pagination plugins for WordPress. These plugins can extend the functionality and customization options available in your pagination system.
- Add custom code: If you are comfortable with coding, you can add pagination to your theme using custom code. This provides you with the most customization options.
Why Use WordPress Pagination?
Using pagination in WordPress provides several advantages that improve the user experience and the performance of your website, especially when dealing with large amounts of content. Here are a few reasons why you should use WordPress pagination:
Improved User Experience
When there is a lot of content on a single page, users can become overwhelmed and navigation becomes difficult. Pagination divides the content into smaller, more manageable sections, allowing users to easily navigate through it.
Faster Page Load Times
Loading a large amount of content at once can cause your website’s performance to suffer. Pagination loads only a portion of the content at first, reducing the load time for each page. This is especially true for mobile users or visitors who have slower internet connections.
Search Engine Optimization (SEO)
The speed at which a page loads is frequently taken into account by search engines. Pagination can speed up page loads, which can improve your website’s SEO and raise its position in search results.
How to Use Built-in Pagination System In WordPress
Pagination for your content can be implemented fairly easily with WordPress thanks to its built-in pagination system. The pagination links are generated by this system using the paginate_links() function based on your settings. The WordPress built-in pagination system is explained in detail here.
Here are the steps on how to use the built-in pagination system in WordPress:
- Go to Settings > Reading.
- In the Blog pages show at most field, enter the number of posts you want to display per page.
- Click on the Save Changes button.
How to Add Pagination in WordPress Using Plugin
Bron Technology recommends you to use WP-Paginate by Max Foundry for Pagination in WordPress.
WP-Paginate Plugin
WP-Paginate is a straightforward and adaptable pagination plugin that improves user navigation on your WordPress website.
Pagination has been widely reported to improve both the user experience for your visitors and the SEO of your site by adding more links to your content.

Installation Process of WP-Paginate Plugin
There are two method to install and activate plugin:
From Admin Panel:
- Open WordPress Admin Panel
- Go To Plugins and Click Add New Plugins
- Search WP-Paginate from Right side search bar
- Click Install Now and Activate the Plugin.
- It is ready to use

From FTP:
- Visit WordPress official site (wordpress.org).
- From Menu click download and Extend and the go plugin option.
- There will be the search bar, type WP-Paginate on search bar and click go button.
- Then Showing results for: WP-Paginate
- Click WP-Paginate by Max Foundry
- On right side Click Download Button
- Then Upload Zip to given path (wp-content/plugins) and Unzip the file
- Go to Admin panel and Click on Plugin
- Then Activate WP-Paginate Plugin.

How to Add Custom Pagination in WordPress
Making your own pagination function and styling it to match the design of your theme are required to add custom pagination to a custom WordPress theme. Here is a detailed explanation of how to do it:
Step 1: Adding the Below code in your Theme Function File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
function custom_pagination($numpages = '', $pagerange = '', $paged='') { if (empty($pagerange)) { $pagerange = 2; } global $paged; if (empty($paged)) { $paged = 1; } if ($numpages == '') { global $wp_query; $numpages = $wp_query->max_num_pages; if(!$numpages) { $numpages = 1; } } $pagination_args = array( 'base' => get_pagenum_link(1) . '%_%', 'format' => '/page/%#%', 'total' => $numpages, 'current' => $paged, 'show_all' => False, 'end_size' => 1, 'mid_size' => $pagerange, 'prev_next' => True, 'prev_text' => __('Previous'), 'next_text' => __('Next'), 'type' => 'plain', 'add_args' => False, 'add_fragment' => '' ); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo "<nav class='custom-pagination'>"; echo $paginate_links; echo "</nav>"; } } |
Step 2 : Add Below to call Pagination in WordPress
1 2 3 4 5 |
<?php if (function_exists(custom_pagination)) { custom_pagination($custom_query->max_num_pages,"",$paged); } ?> |
Step 3: Add CSS Code for Design Pagination in WordPress
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
.custom-pagination span{ background-color: #ffffff; border-radius: 3px; cursor: pointer; padding: 12px; border: 1px solid #eee; padding: 8px 15px 8px 15px; line-height: 45px; } .custom-pagination a{ background-color: #ffffff; border-radius: 3px; cursor: pointer; padding: 12px; border: 1px solid #eee; padding: 8px 15px 8px 15px; line-height: 45px; } .page-numbers.current{ background-color: #db1e29; color: #fff; } |
Finally, we have reached our destination. The tested screenshot for the proof is shown below. For almost all of the websites I work on for clients, I use this step. So it ought to function.
