WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Advanced Custom Fields] WYSIWYG p tag not rendering

[Resolved] [Plugin: Advanced Custom Fields] WYSIWYG p tag not rendering

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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!

    Worked perfectly, thanks!

    Plugin Author elliotcondon

    @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 ‘[Resolved] [Plugin: Advanced Custom Fields] WYSIWYG p tag not rendering’ is closed to new replies.