Advertisement
LittleBrother

Specific-post-loop.php

Feb 25th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement