custom field WYSIWYG content not displaying with formatting

Support Meta Box AIO custom field WYSIWYG content not displaying with formatting

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #30389
    jimimacjimimac
    Participant

    I've created a WYSIWYG custom field which I'm displaying on a page. It was working fine and the text was formatted as it had been entered in the field (with tags so that it displayed formatted on the frontend).

    It now is just displaying all the text as one continuous block of text and doesnt seem to be adding any p tags to split the paragraphs.

    the link to the page is here...
    https://wordpress-232564-2098483.cloudwaysapps.com/test-page/

    #30390
    jimimacjimimac
    Participant

    update - it seems to be only the p tags that arent being included. Other tags like the <h3> tag is fine.

    #30394
    Long NguyenLong Nguyen
    Moderator

    Hi Jimimac,

    Can you please share the code that creates the custom fields and steps to reproduce the issue?

    #30401
    jimimacjimimac
    Participant

    I created the custom fields in wordpress using the plugin rathr than custom code.

    here's the code Im using to display the field...

    $section = rwmb_meta( 'section' );
    $section_key = 0;
    
    $text = $section[$section_key]['content_blurb'];
    echo $text;

    As I said the other things display fine but the p tags dont seem to be being created when the field is being edited.

    #30402
    jimimacjimimac
    Participant

    I should add that the field is inside a group field

    #30406
    Long NguyenLong Nguyen
    Moderator

    It might relate to this topic https://support.metabox.io/topic/lost-tag-in-wysiwyg-field-in-views/

    #30423
    jimimacjimimac
    Participant

    Ok but I've now tried that and it's still not working.

    It seems to be a problem with how the WYSIWYG field. Is there someone who could have a look?

    Because that thread above doesnt seem to have a solution which is worrying.

    #30424
    jimimacjimimac
    Participant

    Also the strange thing is that it WAS working fine originally and then all of a sudden the <p> tags disappeared.

    #30442
    Long NguyenLong Nguyen
    Moderator

    Hi,

    It looks like a WordPress issue. I also experience this and try to use the Classic Editor and see the <p> tag also is not added. You can try to add the <p> tag with a class in the tab Text to fix this issue.

    <p class="custom-text">This is a paragraph 1</p>
    <h3>This is a heading</h3>
    <p class="custom-text">This is a paragraph 2</p>
    #37172
    kevin@digitalgravy.co[email protected]
    Participant

    I'm having the exact same problem. The WSYWYG editor removes <p> tags and thus makes itself impossible to use when trying to call the data dynamically to the site's front end. Did anyone find a fix for this?

    #39200
    Davor MlinarićDavor Mlinarić
    Participant

    Same here. Strange is that it was fine for first few posts, but then it stopped storing <p> tags on new posts. When i edit and resave first few posts it's ok on them, but not on new ones. wysiwyg inside cloneable group.

    #39352
    HazmiHazmi
    Participant

    I have the same problem.

    #43494
    A C Harris ComptonA C Harris Compton
    Participant

    I'm having the same issue with WYSIWYG custom field and Regular Text Custom Field in Bricks Builder on the front-end the <p> tags are being removed when pulling data dynamically.

    Is there a way to fix this?

    #44361
    JBPHJBPH
    Participant

    I'm having exactly the same problem. I am using the WYSIWYG custom field and am outputting via a code block. Anyone find a solution?

    #44366
    jimimacjimimac
    Participant

    yeah you need to wrap it in wpautop()

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.