Git Product home page Git Product logo

bootstrap-wordpress-pagination's Introduction

Bootstrap-wordpress-pagination

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

Featured

  • 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
require_once('wp_bootstrap_pagination.php');

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.

<?php
  if ( function_exists('wp_bootstrap_pagination') )
    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');

bootstrap-wordpress-pagination's People

Contributors

talentedaamer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.