Support » Themes and Templates » Creating Multi-column/row (3 ) layout of unequal length Posts

  • Hello! I’m not a programmer and having extreme difficulty finding a solution to creating a 4-column layout that orders posts/excerpts (of unequal lengths!) in the following manner:

    post 1 — post 2 — post 3 — post 4
    post 5 — post 6 — post 7 — post 8
    post 9 — post 10 — post 11 — post 12
    and so on…

    I’ve found a solution that works for even sized boxes that float left, which is beautifully simple an would be perfect if only the columns could be of various heights and still wrap properly to the next row (see below). I’ve tried inserting row tags around the blocks, but can not figure out how to make post/content flow from row to row (or between containers). I’m relatively comfortable with HTML and CSS by this point but the PHP is tripping me up on this one. Any help would be sincerely appreciated. Here’s the basic code structure I’m using, quoted from:

    <div id=”container_division”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post-block”>
    <h1><?php the_permalink(); ?></h1>
    <?php the_content(); ?>

    <?php endwhile; else: ?>
    <?php endif; ?>

    Kindest thanks!!

  • The topic ‘Creating Multi-column/row (3 ) layout of unequal length Posts’ is closed to new replies.