예제 #1
0
 /**
 Pagination for main loop
 */
 function xinmag_content_nav($nav_id)
 {
     global $wp_query;
     xinmag_content_nav_link($wp_query->max_num_pages, $nav_id);
 }
예제 #2
0
">
<?php 
$blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $postperpage);
if ($pt_category) {
    $blog_args['category__in'] = $pt_category;
}
$blog = new WP_Query($blog_args);
if ($blog->have_posts()) {
    //		xinmag_content_nav_link( $blog->max_num_pages, 'nav-above' );
    $col = 0;
    while ($blog->have_posts()) {
        $blog->the_post();
        if (is_sticky() && $paged == 1) {
            echo '<div class="item sticky">';
        } else {
            echo '<div class="item">';
        }
        get_template_part('content', 'summary');
        echo '</div>';
    }
    xinmag_content_nav_link($blog->max_num_pages, 'nav-below');
    wp_reset_postdata();
}
?>
</div>						
</div>
<?php 
if ($sidebar) {
    get_sidebar();
}
get_footer();