putting <p> tags around WordPress content

I have the following function which puts my content into 2 columns (using Bootstrap 3 framework)

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">'. implode($content). '</div>';
return apply_filters('the_content', $ret);
}

It puts the content text in

Read More

tags but it doesn’t (but I want it to) put

tags in the block quote.

I want it to output

<blockquote>
  <p> the text </p>
</blockquote>

Related posts

1 comment

  1. If I understand your question correctly, you could change this line

    if (!empty($content)) $ret .= '<div id="column2" class="col-md-6">'. implode($content). '</div>';
    

    To the following

    if (!empty($content)) $ret .= '<div id="column2" class="col-md-6"><p>'. implode($content). '</p></div>';
    

Comments are closed.