WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

WP-Paginate

WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.

Install and Activate

  1. Unzip the downloaded WP-Paginate zip file
  2. Upload the wp-paginate folder and its contents into the wp-content/plugins/ directory of your WordPress installation
  3. Activate WP-Paginate from Plugins page

Implement

For posts pagination: * Open the theme files where you'd like pagination to be used. Depending on your theme, this could be in a number of files, such as index.php, archive.php, categories.php, search.php, tag.php, or the functions.php file(s).The twentyeleven theme places the pagination code in functions.php in the twentyeleven_content_nav() function.

Examples:

For the Twenty Seventeen theme, in index.php, replace:

the_posts_pagination( array(
    'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
    'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
    'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
) );

With:

if(function_exists('wp_paginate')):
    wp_paginate();  
else :
    the_posts_pagination( array(
        'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
        'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
        'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
    ) );
endif;

For the Twenty Sixteen theme, in index.php, replace:

    the_posts_pagination( array(
        'prev_text'          => __( 'Previous page', 'twentysixteen' ),
        'next_text'          => __( 'Next page', 'twentysixteen' ),
        'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
    ) );

With:

    if(function_exists('wp_paginate')):
        wp_paginate();  
    else :
        the_posts_pagination( array(
            'prev_text'          => __( 'Previous page', 'twentysixteen' ),
            'next_text'          => __( 'Next page', 'twentysixteen' ),
            'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
        ) );
    endif;

For the Twenty Fifteen theme, in index.php, replace:

        the_posts_pagination( array(
            'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
            'next_text'          => __( 'Next page', 'twentyfifteen' ),
            'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
        ) );

With:

        if(function_exists('wp_paginate')):
            wp_paginate();  
        else :
        the_posts_pagination( array(
            'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
            'next_text'          => __( 'Next page', 'twentyfifteen' ),
            'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
        ) );
      endif;

For comments pagination: 1) Open the theme file(s) where you'd like comments pagination to be used. Usually this is the comments.php file.

2) Replace your existing previous_comments_link() and next_comments_link() code block with the following:

<?php if(function_exists('wp_paginate_comments')) {
    wp_paginate_comments();
} ?>

Configure

1) Configure the WP-Paginate settings, if necessary, from the WP-Paginate option in the Settings menu

2) The styles can be changed with the following methods:

  • Add a wp-paginate.css file in your theme's directory and place your custom CSS there
  • Add your custom CSS to your theme's styles.css
  • Modify the wp-paginate.css file in the wp-paginate plugin directory

Note: The first two options will ensure that WP-Paginate updates will not overwrite your custom styles.

Upgrading

To 1.1.1+:

  • Update WP-Paginate settings, change Before Markup to <div class="navigation">
  • Update wp-paginate.css, change .wp-paginate ol to .wp-paginate

Requires: 2.6.0 (2.7.0 for comments pagination) or higher
Compatible up to: 4.7.1
Last Updated: 1 day ago
Active Installs: 70,000+

Ratings

4 out of 5 stars

Support

1 of 3 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,4,4
50,4,2 100,1,1
100,3,3 100,1,1
86,7,6 100,2,2
100,4,4 100,7,7
100,6,6 100,1,1 100,1,1
64,11,7 100,1,1 100,7,7 100,5,5
100,2,2
100,7,7
100,3,3 100,1,1
100,2,2 100,1,1
100,12,12 100,9,9
83,6,5
100,8,8
78,9,7
100,1,1
100,5,5
87,15,13 100,4,4
100,6,6
85,20,17
50,10,5
75,4,3
83,6,5
86,7,6
80,5,4
100,7,7
33,3,1
100,1,1
100,1,1
100,1,1
0,1,0
100,1,1
100,1,1
100,2,2
0,1,0
100,1,1
100,2,2 100,1,1
100,1,1
50,2,1
100,1,1
100,1,1