Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function your_custom_pagination() {
- global $wp_query;
- $total = $wp_query->max_num_pages;
- if ( $total > 1 ) {
- if ( !$current_page = get_query_var('paged') ) {
- $current_page = 1;
- }
- echo paginate_links(array(
- 'base' => get_pagenum_link(1) . '%_%',
- 'format' => '?paged=%#%',
- 'current' => $current_page,
- 'total' => $total,
- 'mid_size' => 4,
- 'type' => 'list',
- 'prev_text' => '<span><<</span>',
- 'next_text' => '<span>>></span>'
- ));
- }
- }
Add Comment
Please, Sign In to add comment