Skip to content

Instantly share code, notes, and snippets.

@rabbitinblack
Last active September 17, 2020 04:17
Show Gist options
  • Save rabbitinblack/d1290664628589178ee035c234cc23a2 to your computer and use it in GitHub Desktop.
Save rabbitinblack/d1290664628589178ee035c234cc23a2 to your computer and use it in GitHub Desktop.
<?php
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $the_query->max_num_pages
) );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment