Query the posts like you are known to it, but then get all posts and restructure them for the order you need it. Take care of setting up the global
$post variable your own so that to ensure you template code still works.
array_chunkDocs function normally comes in handy for column based output:
$query = WP_Query($queryParameters);
$columnCount = 3;
$rows = array_chunk($query->get_posts(), $columnCount);
foreach (range(0, $columnCount - 1) as $column)
printf("<div class=\"class-%dcolumn\">\n", $column + 1);
foreach ($rows as $row)
if (false == isset($row[$column]))
$post = $row[$column];
... single post template html/php mixture ...
Some additional notes:
- CSS class names can not start with a number. Please see the CSS specification and/or What characters are valid in CSS class names? - I prefixed those with
- You might not need this exact source-order. If not, you can just output one post after the other and take care of column display with CSS only. That normally lightens up the template code a lot.