Advertisement
alchymyth

two col loop

Mar 1st, 2012
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. query_posts( $query_args );
  2. if (have_posts()) :
  3. echo '<div class="six columns">';
  4. while (have_posts()) : the_post();
  5. $postcount++;
  6. if( ($postcount % 2) == 1 ) : // skip 'even' posts
  7.    
  8.     else :
  9.                
  10.         include('post-loop.php');
  11.                
  12.     endif;
  13. endwhile;
  14.    
  15. echo '</div> <!-- end first column -->';
  16. $postcount = 0;
  17. rewind_posts();
  18. echo '<div class="six columns"> <!-- start second column -->';
  19. while(have_posts()) : the_post();
  20. $postcount++;
  21. if( ($postcount % 2) != 1 ) : // skip 'odd' posts
  22.    
  23.     else :
  24.                
  25.         include('post-loop.php');
  26.                
  27.     endif;
  28. endwhile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement