I have the following code which puts my Wordpress content into 2 columns (Bootstrap 3 framework). It splits the content at the 'read more' tag.
functions.php
function split_content() {
global $more;
$more = true;
$content = preg_split('/<span id="more-\d+"><\/span>/i', get_the_content('more'));
// first content section in column1
$ret = '<div id="column1" class="col-md-6">'. array_shift($content). '</div>';
// remaining content sections in column2
if (!empty($content)) $ret .= '<div id="column2" class="col-md-6"><p>'. implode($content). '</p></div>';
return apply_filters('the_content', $ret);
}
this puts it all in < p > tags etc. except for the first paragraph. All the filters/etc don't seem to affect the first paragraph of the first column, but works fine for everything else
You need to replace your 6th line with the below code. As you can see the first paragraph is generated by 6th line and thus missing p
tag. It is mentioned in the comments section of the code as well.
$ret = '<div id="column1" class="col-md-6"><p>'. array_shift($content). '</p></div>';