Advertisement
Guest User

Untitled

a guest
Oct 17th, 2011
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php
  2.     global $query_string;        //make sure these are in the correct format for post queries
  3.     global $query_string1;
  4.  
  5.     // First loop
  6.     $first_loop = new WP_Query( $query_string.'category_name=news&posts_per_page=3');
  7.  
  8.     while ( $first_loop->have_posts() ) : $first_loop->the_post() :
  9. $first_loop->the_content();
  10.     endwhile;
  11.  
  12.  
  13.     // second loop
  14.     $second_loop = new WP_Query( $query_string1.'category_name=news&posts_per_page=3');
  15.  
  16.     while ( $second_loop->have_posts() ) : $second_loop->the_post() :
  17. $second_loop->the_content();
  18.     endwhile;
  19.  
  20.     // Reset Post Data
  21.     wp_reset_postdata();
  22.  
  23. ?>
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement