
Two Columns
By:
Digitalraindrops on
Mar 1st, 2012 | syntax:
PHP | size: 0.64 KB | hits: 106 | expires: Never
<?php
query_posts( $query_args );
if (have_posts()) :
$postcount=0;
while (have_posts()) : the_post();
$postcount++;
?>
<?php if( $postcount % 2 ) : //Left Column ?>
<div class="six columns">
<?php get_template_part('post','loop'); ?>
</div>
<?php else: ?>
<div class="six columns">
<?php get_template_part('post','loop'); ?>
</div>
<div class="clear"></div> <!-- Clear Both -->
<?php
endif;
endwhile;
/* Finished on an Odd Number Add a Div and Clear */
if( $postcount % 2 ) :
?>
<div class="six columns"></div><!-- Empty Box -->
<div class="clear"></div> <!-- Clear Both -->
<?php
endif;