Skip to content

Instantly share code, notes, and snippets.

@goshdarnit
Created May 4, 2010 18:33
Show Gist options
  • Save goshdarnit/389775 to your computer and use it in GitHub Desktop.
Save goshdarnit/389775 to your computer and use it in GitHub Desktop.
<?php
/* In the case you're rendering the very last post, do nothing: */
if ($count == 4){
// Do nothing, thematic will add a '</div>' to close the last post
/* Is this the last post in the column?
That means if the loop number divides by 2 (or whatever post per column number we choose) */
} elseif ($count%2 == 0){
/* if this is the bottom post, close the div and start a new div: */
echo '</div>
<div id="column2" class="prepend-8">';
} else {
/* Do nothing, just move on, nothing to see here... */
}
/* We're about to finish the loop, let's add 1 to the count: */
$count = $count + 1;
endwhile; /* loop done, go back up */
/* All the posts are done, close the last column: */
echo '</div>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment