} ?> </div> <!-- .blog-inner --> </div> <!-- .comments --> <?php $comment_links = paginate_comments_links(array('echo' => false, 'type' => 'array')); if (!empty($comment_links)) { ?> <div class="blog-pagination col-md-12 blog-pagination-comments"> <ul class="pagination"> <?php echo coupon_format_pagination($comment_links); ?> </ul> </div> <?php } ?> <!-- comment-form --> <div class="comment-form col-md-12"> <div class="blog-inner"> <div class="caption widget-caption comment-caption"> <h3><?php _e('Leave Comment', 'coupon'); ?> </h3>
</div> </div> </div> <!-- .blog-post-1 --> <?php } ?> <?php if (!empty($page_links)) { ?> <!-- pagination --> <div class="blog-pagination col-md-12"> <ul class="pagination"> <?php echo coupon_format_pagination($page_links); ?> </ul> </div> <!-- .pagination --> <?php } ?> </div> <!-- .row --> <?php } else { ?> <p><?php _e('No blog posts yet!', 'coupon');
if (get_query_var('paged')) { $cur_page = get_query_var('paged'); } else { if (get_query_var('page')) { $cur_page = get_query_var('page'); } else { $cur_page = 1; } } } else { $cur_page = 1; } $newest = new WP_Query(array('post_type' => 'code', 'orderby' => 'date', 'post_status' => 'publish', 'order' => 'DESC', 'posts_per_page' => $newest_per_page, 'paged' => $cur_page, 'meta_query' => array('relation' => "AND", array('key' => 'code_for', 'value' => 'all_users', 'compare' => '='), array('key' => 'code_expire', 'value' => time(), 'compare' => '>')))); $page_links_total = $popular->max_num_pages; $page_links = paginate_links(array('prev_next' => true, 'end_size' => 2, 'mid_size' => 2, 'total' => $page_links_total, 'current' => $cur_page, 'prev_next' => false, 'type' => 'array', 'add_args' => array('tab' => 'newest'))); $newest_pagination = coupon_format_pagination($page_links); } /* calculate width of the boxes based on the active status of the right sidebar */ $max_count = is_active_sidebar('sidebar-right') ? 3 : 4; $col_md = is_active_sidebar('sidebar-right') ? 4 : 3; ?> <!-- ===================================================================================================================================== T O P 2 0 C O N T E N T ====================================================================================================================================== --> <!-- top20 --> <section class="top20"> <!-- container --> <div class="container">