Hi all,
I have this code on a template page to put posts from a single category (16 in this case)in a multi column layout, and it works, except it arranges the posts by date instead of alpha. I'm assuming there is a function for this kind of thing?
Thank you!
Leslie
<div id="column_01">
<!-- FIRST LOOP: display posts 1 thru 5-->
<?php query_posts('showposts=5&cat=16'); ?>
<?php $posts = get_posts('numberposts=5&offset=0'); foreach ($posts as $post) : start_wp(); ?>
<?php static $count1 = 0; if ($count1 == "5") { break; } else { ?>
<div style="entry-title"><?php the_title(); ?></div>
<?php the_content(); ?>
<?php $count1++; } ?>
<?php endforeach; ?>
</div>
<div id="column_02">
<!-- SECOND LOOP: display posts 6 thru 10-->
<?php query_posts('showposts=5&cat=16'); ?>
<?php $posts = get_posts('numberposts=5&offset=5'); foreach ($posts as $post) : start_wp(); ?>
<?php static $count2 = 0; if ($count2 == "5") { break; } else { ?>
<div style="entry-title"><?php the_title(); ?></div>
<?php the_content(); ?>
<?php $count2++; } ?>
<?php endforeach; ?>
</div>
<div id="column_03">
<!-- THIRD LOOP: display posts 11 thru 15-->
<?php query_posts('showposts=6&cat=16'); ?>
<?php $posts = get_posts('numberposts=5&offset=10'); foreach ($posts as $post) : start_wp(); ?>
<?php static $count3 = 0; if ($count3 == "5") { break; } else { ?>
<div style="entry-title"><?php the_title(); ?></div>
<?php the_content(); ?>
<?php $count3++; } ?>
<?php endforeach; ?>
</div>