1
votes

I created meta-box with wordpress editor field. By this tutorial: https://imtiazrayhan.com/add-wysiwyg-editor-custom-meta-boxes/#comment-133

Everything okay, but in front-end I can't see same results like I filled on editor.

Example:

On editor: I use paragraph, br

<p>Test</p></br>
<p>Test</p></br>
<p>Test</p></br>

So on editor everything is fine, but on my front-end I get:

Test Test Test

It seems like this meta-box won't allow p and br tags or something like this...

I get my metabox on front with this:

$content = get_post_meta($post->ID, 'custom_editor', true);

Thanks.

1

1 Answers

1
votes

Check this code to echo the content

$content = get_post_meta($post->ID, 'custom_editor', true);
echo nl2br($content);