First of, this is pretty much an exact duplicate of: Split columns into three+ divs?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?