First of, this is pretty much an exact duplicate of:
Split columns into three+ divs?
But the given solution does not work (returns blank). I’m guessing it collides with qTranslate which adds some really weird comments to the html, but i’m not sure.
I found a great code snippet that simply splits the content into pieces by the more tag. The problem is it seems to only split into two columns. It ignores the rest of the more tags. I am not actually dividing the content into columns, but rather into horisontal sections (with a divider inbetween).
The current code:
function split_content() {
global $more;
$more = true;
$content = preg_split('/<span id="more-d+"></span>/i', get_the_content('more'));
for($c = 0, $csize = count($content); $c < $csize; $c++) {
$content[$c] = apply_filters('the_content', $content[$c]);
}
return $content;
}
The suggested solution in the linked thread does not work, and i have searched for other solutions but haven’t found anything working.
It is important that the content is returned in an array of “columns”. Like $content[0]
is column 1, $content[1]
is column2 etc.
Any ideas?
Why not just create a few shortcodes for what you need?
you can create columns for all kind of uses,,
add this to your themes function.php file..
Then add some css to your themes style.css file
then when writing a post use your new shortcodes to create areas for specific text etc..
change all the function names to suit your theme, and edit any css to match your theme settings etc..
full source here
http://tutorials.mysitemyway.com/adding-column-layout-shortcodes-to-a-wordpress-theme/
Marty