• Resolved Eddie

    (@mseddie)


    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

    http://wordpress.org/extend/plugins/advanced-custom-fields/

Viewing 3 replies - 1 through 3 (of 3 total)
  • ladyroboto

    (@ladyroboto)

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

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    $myCopyBlockMeta = get_post_meta($postid, 'my_field_name', true);
    $myCopyBlock = wpautop($myCopyBlockMeta);
    wp_reset_query();
    
    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!

    Thread Starter Eddie

    (@mseddie)

    Worked perfectly, thanks!

    Plugin Contributor Elliot Condon

    (@elliotcondon)

    Hey guys,

    Check out the ACF functions like get_field and the_field.

    They do all this for you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Advanced Custom Fields] WYSIWYG p tag not rendering’ is closed to new replies.