<?php /* Template Name: Blog */ get_header(); ?> <div class="main-content-wrapper row"> <div class="main-content column col8"> <?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $latest = new WP_Query(array('post_type' => 'post', 'post__not_in' => get_option('sticky_posts'), 'paged' => $paged)); if ($latest->have_posts()) { while ($latest->have_posts()) { $latest->the_post(); get_template_part('content', 'post'); } } colabs_pagination('', $latest); ?> </div><!-- .main-content --> <aside class="primary-sidebar column col4"> <?php get_sidebar(); ?> </aside><!-- .primary-sidebar --> </div><!-- .main-content --> <?php get_footer();
<?php /** * Pagination - Show numbered pagination for catalog pages. * * @author WooThemes * @package WooCommerce/Templates * @version 2.2.2 */ if (!defined('ABSPATH')) { exit; } global $wp_query; if ($wp_query->max_num_pages <= 1) { return; } colabs_pagination();
function colabs_pagenav() { global $colabs_options, $wp_query, $paged, $page; // If the user has set the option to use simple paging links, display those. By default, display the pagination. if (@$colabs_options['colabs_pagination_type'] == 'simple') { if (is_home() || is_archive()) { ?> <p id="page"> <strong class="page-prev"><?php previous_posts_link('Previous posts'); ?> </strong> <!--a href="#">Full Archives</a--> <strong class="page-next"><?php next_posts_link('Next posts', ''); ?> </strong> </p><!--/#page--> <?php } else { if (get_next_posts_link() || get_previous_posts_link()) { ?> <div class="nav-entries"> <?php next_posts_link('<span class="nav-prev fl">' . __('<span class="meta-nav">←</span> Older posts', 'colabsthemes') . '</span>'); ?> <?php previous_posts_link('<span class="nav-next fr">' . __('Newer posts <span class="meta-nav">→</span>', 'colabsthemes') . '</span>'); ?> <div class="clear"></div> </div><!--/.nav-entries--> <?php } } // End IF Statement } else { colabs_pagination(); } // End IF Statement }