custom field WYSIWYG content not displaying with formatting
Support › Meta Box AIO › custom field WYSIWYG content not displaying with formatting
- This topic has 15 replies, 7 voices, and was last updated 1 year, 3 months ago by
A C Harris Compton.
-
AuthorPosts
-
August 23, 2021 at 11:44 PM #30389
jimimac
ParticipantI'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/August 23, 2021 at 11:59 PM #30390jimimac
Participantupdate - it seems to be only the p tags that arent being included. Other tags like the <h3> tag is fine.
August 24, 2021 at 10:36 AM #30394Long Nguyen
ModeratorHi Jimimac,
Can you please share the code that creates the custom fields and steps to reproduce the issue?
August 24, 2021 at 5:27 PM #30401jimimac
ParticipantI 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.
August 24, 2021 at 5:27 PM #30402jimimac
ParticipantI should add that the field is inside a group field
August 24, 2021 at 8:18 PM #30406Long Nguyen
ModeratorIt might relate to this topic https://support.metabox.io/topic/lost-tag-in-wysiwyg-field-in-views/
August 25, 2021 at 3:32 PM #30423jimimac
ParticipantOk 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.
August 25, 2021 at 3:34 PM #30424jimimac
ParticipantAlso the strange thing is that it WAS working fine originally and then all of a sudden the <p> tags disappeared.
August 26, 2021 at 10:39 AM #30442Long Nguyen
ModeratorHi,
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>
July 25, 2022 at 4:55 AM #37172[email protected]
ParticipantI'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?
November 18, 2022 at 4:58 AM #39200Davor Mlinarić
ParticipantSame 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.
November 27, 2022 at 6:49 AM #39352Hazmi
ParticipantI have the same problem.
October 11, 2023 at 7:16 PM #43494A C Harris Compton
ParticipantI'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?
January 21, 2024 at 10:42 PM #44361JBPH
ParticipantI'm having exactly the same problem. I am using the WYSIWYG custom field and am outputting via a code block. Anyone find a solution?
January 22, 2024 at 10:07 PM #44366jimimac
Participantyeah you need to wrap it in wpautop()
-
AuthorPosts
- You must be logged in to reply to this topic.