How to Add Pagination in Your Custom Template
1.Add following codes in your page template before starting posts query. $args = array( 'post_type' => 'post', 'meta_key' => '_thumbnail_id', 'posts_per_page' => 7, 'paged' => $paged); $query = new WP_Query($args); 2.After end of While loop and before close of IF statement paste following code. echo ' <div id="wp_pagination"> <a class="first page button" href="'.get_pagenum_link(1).'">«</a> <a class="previous page button" href="'.get_pagenum_link(($curpage-1 > 0 ? $curpage-1 : 1)).'">‹</a>'; for($i=1;$i<=$query->max_num_pages;$...