Advanced Custom Fields
[resolved] WYSIWYG p tag not rendering (4 posts)

  1. Eddie
    Posted 4 years ago #

    I'm using Advanced Custom Fields to add a second WYSIWYG editor to a page - The problem is that it's not rendering any <p> tag around regular text within the additional WYSIWYG editor
    - The default editor is working
    - Both editors are rendering other HTML tags correctly


  2. ladyroboto
    Posted 4 years ago #

    Assuming you are using get_meta_data to retrieve your variable, I had the same problem. Here's the solution:

    global $wp_query;
    $postid = $wp_query->post->ID;
    $myCopyBlockMeta = get_post_meta($postid, 'my_field_name', true);
    $myCopyBlock = wpautop($myCopyBlockMeta);
    if ($myCopyBlock) {
    echo $myCopyBlock;

    Also, if you are copy/pasting any text into your advanced custom field, make sure you backspace and recreate any line breaks. It seems that the field won't recognize the paragraph breaks otherwise.

    Hope this helps!

  3. Eddie
    Posted 4 years ago #

    Worked perfectly, thanks!

  4. elliotcondon
    Plugin Author

    Posted 4 years ago #

    Hey guys,

    Check out the ACF functions like get_field and the_field.

    They do all this for you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.