WordPress numbered pagination created with bootstrap styling.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



A custom WordPress numbered pagination function to fully implement the Bootstrap 3.x pagination/pager style in a custom theme.


  • Bootstrap Styling
  • First & Last Buttoon
  • Next & Previous Button
  • Glyphicon can be added instead of Next & Pervious values
  • Filter to overwrite values

How it Looks

Below is the example of the Bootstrap WordPress Pagination. You can customize it with your own CSS styling. Extras

installing Bootstrap WordPress Pagination

Place wp_bootstrap_pagination.php in your WordPress theme folder /wp-content/your-theme/

Open your WordPress themes functions.php file /wp-content/your-theme/functions.php and add the following code:

// Register Custom Navigation Walker

or simply open the wp_bootstrap_pagination.php copy all the code and paste it in your themes functions.php file

Using Bootstrap WordPress Pagination

Update your index.php or template-blog.php or any other file where you want to show the pagination. Add the below code into the file to show the Bootstrap WordPress Pagination.

  if ( function_exists('wp_bootstrap_pagination') )

if pagination is not showing, go to WordPress Dashboard > Reading > Blog pages show at most > set value smaller then number of posts your blog has.

Filtering Next & Previous

To filter next and previous values use the following snippet into functions.php

function customize_wp_bootstrap_pagination($args) {
    $args['previous_string'] = 'previous';
    $args['next_string'] = 'next';
    return $args;
add_filter('wp_bootstrap_pagination_defaults', 'customize_wp_bootstrap_pagination');