Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pagination() {
- global $wp_query;
- $total_pages = $wp_query->max_num_pages;
- if ($total_pages > 1){
- $current_page = max(1, get_query_var('paged'));
- echo paginate_links(array(
- 'base' => get_pagenum_link(1) . '%_%',
- 'format' => '/page/%#%',
- 'current' => $current_page,
- 'total' => $total_pages,
- ));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement