Advertisement
Guest User

Untitled

a guest
Aug 13th, 2014
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. // Pagination
  2. function my_theme_navigation() {
  3. global $shortname;
  4.  
  5. if ( 'next-previous-links' == get_theme_mod( 'pagination_style' ) ) :
  6. // the block for next-prev navigation
  7. echo '<div class="button left">';
  8. next_posts_link('Older');
  9. echo '</div>';
  10. echo '<div class="button right">';
  11. previous_posts_link ('Newer');
  12. echo '</div>'; else :
  13. // the block for pagination
  14. global $wp_query;
  15. $big = 999999999;
  16. // need an unlikely integer
  17. echo paginate_links( array( 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '?paged=%#%','end_size' => 1,'mid_size' => 2, 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ) );
  18. endif;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement