示例#1
0
_e('There are currently', 'junkie');
?>
 <strong><?php 
echo wp_count_posts('post')->publish;
?>
</strong> <?php 
_e('posts', 'junkie');
?>
</span>
    </div><!-- content-heading -->
    	
	<?php 
$current = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post_type' => 'post', 'posts_per_page' => get_option("posts_per_page"), 'paged' => $current, 'order' => 'DESC');
$recent = new WP_Query($args);
while ($recent->have_posts()) {
    $recent->the_post();
    get_template_part('content', 'post');
}
?>
	
	<?php 
junkie_pagination($recent->max_num_pages, $recent->query_vars['paged']);
?>
	
	
</div><!-- #content .content-loop -->

<?php 
get_sidebar();
get_footer();
示例#2
0
</h3>
    </div><!-- .content-heading --> 	
     	
    <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        get_template_part('content');
    }
} else {
    get_template_part('coupon', 'none');
}
wp_reset_query();
?>
		<?php 
junkie_pagination();
?>

    <div class="content-heading clearfix"> 
    	<h3><?php 
_e('Unreliable Coupons', 'junkie');
?>
</h3>
    </div><!-- .content-heading -->

	<?php 
$args = array('post_type' => 'coupon', 'posts_per_page' => 5, 'post_status' => 'expire', 'orderby' => 'DESC', 'meta_query' => array(array('key' => 'expire_date', 'value' => current_time('mysql'), 'compare' => '<', 'type' => 'DATE')), 'tax_query' => array(array('taxonomy' => 'coupon_store', 'field' => 'slug', 'terms' => $term->slug)));
$recent = new WP_Query($args);
if ($recent->have_posts()) {
    while ($recent->have_posts()) {
        $recent->the_post();