SHARE
TWEET

Specific-post-loop.php

LittleBrother Feb 25th, 2014 36 Never
  1. <?php                                  
  2.         if( is_category() ) :
  3.         $the_query = new WP_Query('tag=featured&showposts=2&cat='.get_query_var('cat'));
  4.         else : $the_query = new WP_Query('showposts=2&orderby=post_date&order=desc');
  5.         endif;
  6. ?>
  7.                                
  8. <?php
  9.         if( $the_query->have_posts() ) : while( $the_query->have_posts() ) : $the_query->the_post()
  10. ?>
RAW Paste Data
Top