Posts in three columns
-
I want to have three columns instead of two.
What do I change?
<table cellpadding="10" cellspacing="10" border="0"> <?php $column = 1; ?> <?php // The LOOP. Do this for all posts: while (have_posts()) : the_post(); $postcount++; ?> <?php if ($column == 1) echo "<tr>"; ?> <td class="column<?php echo $col;?>" style="vertical-align: top"> <div class="post" id="post-<?php the_ID(); ?>"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1> <div class="descr"><?php the_time('l, F jS Y, G:i a T') ?></div> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> </td> <?php if ($column == 2) echo "</tr>"; (($column==1) ? $column=2 : $column=1); ?> <?php // END of the LOOP endwhile; ?> </table>
Also I want the post to go down than to the side.
e.g.
1 2
3 4
5 6I want:
1 4
2 5
3 6
- The topic ‘Posts in three columns’ is closed to new replies.