Tag: php

Pagination for custom post in wordpress

Here is how to implement Pagination for custom posts in wordpress. Add this to functions.php function pagination_bar() { 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' =>...
Click to Chat