I'd like my posts spread across different areas of my layout instead of the classic blog like feel. This is achieved on other sites like Kineda.com using Wordpress.
I want to know how I can play with the loop in order to achieve this.
But btw, as it is in a loop, just do a counter, and do something like this:
$counter = 0;
while(whatever) {
if ($counter == 0) {
echo "<tr>";
}
echo "<td>post</td>";
if ($counter == 2) {
echo "</tr>";
$counter = -1; //to make up for the counter++ below
}
$counter++;
}
// next bit fixes it up, incase it just ends in <tr><td>post</td>
if ($counter == 1 || $counter == 2) {
if ($counter == 1) {
echo "<td></td>";
}
echo "</tr>";
}
}
something like that, anyway. and add <table>/</table>. that is if it is in a table, ofcourse
Two snags. The first that you would need a counter, which only ticked up when the category matched the one you were looking for, but that is easily adapted from one of the previous posts, if not explained on the page I linked to. The second is that you would need multiple loops, as explained here:
Comment