Grid layout (side by side) with different post classes? (1 post)

  1. adu co
    Posted 2 years ago #

    Hi! I'm working on a theme where i'm using the code below to grid posts side by side, the problem is that i'm working with Twitter bootstrap and i'd like to give the first and last post on each row a "pull-left" or "pull-right" class.

    Any ideas?

    <?php query_posts('category_name=Menucard'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<div class="span4 post move pull-left">
    		    //echo post here
    	</div> <!-- close .post div -->
    	    if ($counter % 3 == 0) {
    	    echo '<div style="clear:both;"></div>';

Topic Closed

This topic has been closed to new replies.

About this Topic