Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Pagination
- function my_theme_navigation() {
- global $shortname;
- if ( 'next-previous-links' == get_theme_mod( 'pagination_style' ) ) :
- // the block for next-prev navigation
- echo '<div class="button left">';
- next_posts_link('Older');
- echo '</div>';
- echo '<div class="button right">';
- previous_posts_link ('Newer');
- echo '</div>'; else :
- // the block for pagination
- global $wp_query;
- $big = 999999999;
- // need an unlikely integer
- 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 ) );
- endif;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement