/** * Renders pagination * * @access public * @return void */ public static function renderPagination() { global $wp_query; $args['base'] = str_replace(999999999, '%#%', get_pagenum_link(999999999)); $args['total'] = $wp_query->max_num_pages; $args['current'] = mtheme_paged(); $args['mid_size'] = 2; $args['end_size'] = 1; $args['prev_text'] = '<i class="fa fa-angle-left icon-list-item"></i>'; $args['next_text'] = '<i class="fa fa-angle-right icon-list-item"></i>'; $out = paginate_links($args); if ($out != '') { $out = '<nav class="pagination">' . $out . '</nav>'; } echo mtheme_html($out); }
</div> <div class="posts-listing col-lg-9 col-md-9 col-sm-12 col-xs-12"> <?php } elseif ($layout == 'right') { ?> <div class="posts-listing col-lg-9 col-md-9 col-sm-12 col-xs-12"> <?php } else { ?> <div class="posts-listing col-lg-12"> <?php } ?> <?php query_posts(array('post_type' => 'post', 'paged' => mtheme_paged(), 'posts_per_page' => $columns)); if (have_posts()) { while (have_posts()) { the_post(); if ($layout == 'fullwidth') { get_template_part('content', 'blog'); } else { get_template_part('content', 'post'); } } ?> <div class="post-pagination"> <?php MthemeInterface::renderPagination(); if (MthemeInterface::isRenderPagination()) { paginate_comments_links();