• On my front page, I have the most recent post look like a typical blog post. The next step is to have the next three recent posts follow in three columns:

    —-NEWEST—-
    ————–
    ————–

    -1- -2- -3-
    — — —
    — — —
    — — —

    —-FOOTER—-

    I’ve successfully set up two loops so that I can style the newest post differently from whatever posts follow, but does anybody know how to have, essentially, four loops so that I can break those three posts up into columns?

    This page has been of some help: https://codex.www.ads-software.com/The_Loop#Multiple_Loops But it doesn’t take it to the extent I need help with.

Viewing 1 replies (of 1 total)
  • this loop is the same, just rewinded and used again (here are no different loops) and does what you need on the index page of seosumo.com

    <?php query_posts('showposts=1');
    while (have_posts()): the_post(); ?>
    
    <div class="entry" id="post-<?php the_ID(); ?>">
    
    <div class="postheader">
    <span class="postinfo postdate"><?php the_time('F j, Y'); ?></span>
    <span class="socialb">
    
    </span>
    	<h1 class="typeface-js"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    	<span class="postinfo"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — Posted by <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></span>
    </div>
    	<?php $more = 1; the_content(); ?>
    
    <?php link_pages('<p class="pagenavigator"> ', '
    ', 'next', ' next page', 'previous page '); ?>
    
     	<div class="postfooter postinfo"><?php the_tags(__('Tags: '), ', ', ' — '); ?></div>
        <!-- end Entry --></div>
    
          <?php endwhile; ?>
    
    ... boring html css code and then ...
    
    <?php rewind_posts(); query_posts('offset=1'); while (have_posts()): the_post(); ?>
    
      <div class="excerpt" id="post-<?php the_ID(); ?>">
      <div class="excerptcont">
    <div class="postheader">
    <span class="postinfo"><?php the_time('F j, Y'); ?></span>
    	<h1 class="typeface-js"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1></div>
    
    	<?php the_content(__('(more...)')); ?>
        <!-- end #ecxerptcont --></div>
        <!-- end #ecxerpt --></div>
    <?php endwhile; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Using multiple loops with multiple columns’ is closed to new replies.