Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_paginacion_propiedades($wp_query)
- {
- global $wp_rewrite;
- $pages = '';
- //Calcular de paginas que tiene
- $max = $wp_query->max_num_pages;
- //Que pagina estoy
- global $paged;
- $current = ($paged) ? $paged : 1;
- $a['base'] = @add_query_arg('page','%#%');
- $a['total'] = $max;
- $a['current'] = $current;
- $total = 1; //1 - display the text "Page N of N", 0 - not display
- //Links a izquierda y derecha
- $a['mid_size'] = 3; //how many links to show on the left and right of the current
- $a['end_size'] = 1; //how many links to show in the beginning and end
- //$a['prev_text'] = '<'; //text of the "Previous page" link
- $a['prev_text'] = 'Anterior';
- $a['next_text'] = 'Siguiente';
- if ($max > 1) {
- echo '<div class="enigma_blog_pagination">';
- }
- echo '<div class="enigma_blog_pagi">';
- if ($total == 1 && $max > 1) {
- //$pages = '<span class="pages">Page ' . $current . ' of ' . $max . '</span>'."\r\n";
- echo $pages . paginate_links($a);
- }
- if ($max > 1) {
- echo '</div>';
- }
- echo '</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement