Guest User

Untitled

a guest
Oct 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function your_custom_pagination() {
  2. global $wp_query;
  3. $total = $wp_query->max_num_pages;
  4.  
  5. if ( $total > 1 ) {
  6. if ( !$current_page = get_query_var('paged') ) {
  7. $current_page = 1;
  8. }
  9. echo paginate_links(array(
  10. 'base' => get_pagenum_link(1) . '%_%',
  11. 'format' => '?paged=%#%',
  12. 'current' => $current_page,
  13. 'total' => $total,
  14. 'mid_size' => 4,
  15. 'type' => 'list',
  16. 'prev_text' => '<span><<</span>',
  17. 'next_text' => '<span>>></span>'
  18. ));
  19. }
  20. }
Add Comment
Please, Sign In to add comment