Custom Fields
Re-Envisioned
Support Meta Box AIO custom field WYSIWYG content not displaying with formatting

  • Creator
    Topic
  • #30389
    jimimac
    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/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #30390
    jimimac
    Participant

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

    #30394
    Long Nguyen
    Moderator

    Hi Jimimac,

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

    #30401
    jimimac
    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
    jimimac
    Participant

    I should add that the field is inside a group field

    #30406
    Long Nguyen
    Moderator
    #30423
    jimimac
    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
    jimimac
    Participant

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

    #30442
    Long 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>
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.