Advertisement
alchymyth

showcase - recent- full

Feb 12th, 2013
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 <section class="recent-posts">
  2.                     <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1>
  3.  
  4.                     <?php
  5.  
  6.                     // Display our recent posts, ignoring Aside posts.
  7.                     $recent_args = array(
  8.                         'order' => 'DESC',
  9.                         'post__not_in' => get_option( 'sticky_posts' ),
  10.                         'tax_query' => array(
  11.                             array(
  12.                                 'taxonomy' => 'post_format',
  13.                                 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ),
  14.                                 'field' => 'slug',
  15.                                 'operator' => 'NOT IN',
  16.                             ),
  17.                         ),
  18.                         'no_found_rows' => true,
  19.                     );
  20.  
  21.                     // Our new query for the Recent Posts section.
  22.                     $recent = new WP_Query( $recent_args );
  23.  
  24.                     if ( $recent->have_posts() ) :
  25.  
  26.                     while ( $recent->have_posts() ) : $recent->the_post(); ?>                      
  27.                         global $more;
  28.                         $more = 0;
  29.  
  30.                         get_template_part( 'content', get_post_format() );
  31.  
  32.                     endwhile; endif; wp_reset_postdata();
  33.  
  34.                 </section><!-- .recent-posts -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement