Viewing 3 replies - 1 through 3 (of 3 total)
  • This is untested but should work, I use something like this for a single category page?

    in the style.css, you may need to fix the width in px or change to 49%, if not working in all browsers.

    .two-column
    {
    	float:left;
    	position: relative;
    	width: 50%;
    }

    Not sure what theme you are using, code would sit inside the loop add a counter.

    <!-- Start the Loop. -->
    <?php if ( have_posts() ) : ?>
    <?php while ( have_posts() ) : the_post(); ?>
    
    <?php $counter+=1 ; ?>
    <?php if($counter > 3): ?>
       <div class="two-column">
    <?php endif; ?>

    Then the loop output code, as you are using narrow columns then maybe output the excerpt if counter is greater than 3, let you work that out!

    Just before the <?php endwhile; ?>

    <?php if($counter > 3): ?>
       </div>
    <?php endif; ?>
    <?php endwhile; ?>

    HTH

    David

    Thread Starter crossx

    (@crossx)

    Thanks David, I have tried this method but is not working!

    I’m working inside the loop.php on twenty ten theme.

    Add the style in the post above to your style.css

    Twenty Ten normal:
    Save loop.php as backup, create new loop.php then paste in this code:

    http://adeptris.pastebin.ca/1929766

    Twenty Ten Child Theme:
    Create a new file loop-index.php, paste the same code inside the file.

    You then have three posts with full width details, the two columns of post excerpts.

    Changes:
    View Pastebin Code
    Lines: 58 – 61: Start Condition if counter > 3 adds the Div element
    Lines: 144 – 148: Output excerpt if counter > 3
    Lines: 179 – 181: Close the div if counter > 3

    HTH

    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create this design-loop?’ is closed to new replies.