i am working to resolve this issue, but this will take a few days.
however, what you are trying to do – left-to-right; top-to-bottom – is in the simplest way done with wrapping the post into a div, fixed width, floated left, right margin; with a counter to add a ‘clear-left’ to every first post in a row, and a different margin to the last post in a row:
<?php
if (have_posts()) :
$columns = 5; //set the number of columns
$i = 1;
while (have_posts()) : the_post(); ?>
<div class="post<?php if( ($i-1)%$columns == 0 ) { echo ' clearleft'; }; if( $i%$columns == 0 ) { echo ' last'; }; ?>" id="post-<?php the_ID(); ?>">
<!-- core post area; title, content, thumbnails, postmeta, etc -->
</div>
<?php $i++;
endwhile;
next_posts_link('« Older Entries');
previous_posts_link('Newer Entries »');
else:
echo 'no posts';
endif; ?>
the css for this:
.post {
float:left;
width: 100px;
margin-right: 10px;
max-height:150px; /*not necessary*/
}
.post.clearleft { clear:left; }
.post.last { margin-right: 0px; }
Interesting solution alchymyth, thank you!!! One of my problems is that divs have different heights, so if they are too long, they “move” the divs bellow.
divs have different heights, so if they are too long, they “move” the divs bellow.
then you may want to have a look at this:
http://www.creativedepart.com
a design like in the above link could be achieved with this code from what i call ‘stacking posts’.
Very nice!! Thanks for the tip, alchymyth!!!!