GavickPro / Meet-GavernWP

Meet GavernWP is a responsive free Wordpress theme
35 stars 23 forks source link

Pagination based on hooks and filters #92

Open dziudek opened 11 years ago

dziudek commented 11 years ago

Pagination like "1 2 3 4 ... Next"

dziudek commented 11 years ago

We need to an option to select the pagination type and use the following code:

global $wp_query;

and:

$big = 999999999;
echo paginate_links( array(
    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    'format' => '?paged=%#%',
    'current' => max( 1, get_query_var('paged') ),
    'total' => $wp_query->max_num_pages
) );