I want to have my front page, with three columns, each assigned to a different category. Ideally I would like to query to fetch one post, per column, per page where possible, leaving the column empty if not.
My current loop simply gets 3 posts at a time. It is reasonable to assume that the 3 will not be one of each category.
Here is the loop:
<?php
global $query_string;
parse_str( $query_string, $my_query_array );
$paged = ( isset( $my_query_array['paged'] ) && !empty( $my_query_array['paged'] ) ) ? $my_query_array['paged'] : 1;
query_posts('post_type=post&posts_per_page=3&paged='.$paged);
if ( have_posts() ) : while ( have_posts() ) : the_post();
$category = choose_one_category(get_the_category());
switch ($category){
case "Festival News":
$left[] = $post;
break;
case "Industry News":
$centre[] = $post;
break;
case "Other":
$right[] = $post;
break;
}
endwhile;
?>
<div class="custom-pagination">
<div ><?php previous_posts_link('« Previous') ?></div>
<div ><?php next_posts_link('Next »') ?></div>
</div>
<?php endif;
?>