@francisco.friesen
function wpb_pagination() {
$prev_arrow = is_rtl() ? '»' : '«';
$next_arrow = is_rtl() ? '«' : '»';
global $wp_query;
$total_pages = $wp_query->max_num_pages;
if ($total_pages > 1){
1 2 3 4 5 6 7 8 9 10 11 |
$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, 'prev_text' => $prev_arrow, 'next_text' => $next_arrow, 'type' => 'list' )); |
} }