How to Create Page Navigation Easy No-Plugin
I used to use the plugin “wp-PageNavi” help me quickly get the page number in the lower end of the category or taxonomy, but later I gradually transformed into the plugin code brief gentle and easy to use . ITS to help your website go down the redundant components, load faster, lighter …
In wordpress there is a function to do this but not everyone knows that understand how to use it. In this article I will be packing guide you, you will do this after no more than 1 minute, and you copy the code below into the right to file category.php or other taxonomy file:
global $wp_query;
$big = 99999;
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'prev_text' => __('« Mới hơn'),
'next_text' => __('Tiếp theo »'),
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
hay quá