Content in two columns
This code is poweful but definitely easy to implement. Just paste it on your functions.php file and it will automatically output your post content in columns.
Your post content will be splitted on tags.
functions.php
function my_multi_col($content){
$columns = explode('</h2>
<h2>', $content);
$i = 0;
foreach ($columns as $column){
if (($i % 2) == 0){
$return .= '
<div class="content_left">' . "\n";
if ($i > 1){
$return .= "
<h2>";
} else{
$return .= '
<div class="content_right">
' . "\n
<h2>";
}
$return .= $column;
$return .= '</h2>
</div>
';
$i++;
}
if(isset($columns[1])){
$content = wpautop($return);
}else{
$content = wpautop($content);
}
echo $content;
}
}
add_filter('the_content', 'my_multi_col');</h2>
</div></h2>
CSS
.content_right, .content_left{ float:left; width:45%; }
.content_left{ padding-right:5%; }