Created
October 24, 2014 20:25
-
-
Save johnheimkes/e7f9bceb8d86b60e03d3 to your computer and use it in GitHub Desktop.
Paginate links with custom WP_Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$big = 999999999; | |
echo paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
'format' => '/page/%#%', | |
'current' => max( 1, get_query_var('paged') ), | |
'total' => $my_query->max_num_pages, | |
'prev_text' => __( 'Previous' ), | |
'next_text' => __( 'Next' ), | |
'type' => 'list', | |
) ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment