Home › Forums › General Issues › Line breaks missing in wysiwyg
Sorry. I’ve found more questions about this problem, but unfortuntaly I didn’t find any answers. Well, actually at least not an answer I understood 🙂
In the backend, the text in a wysiwyg custom field looks great. Linebreaks where they are supposed to be.
On the front end however, all <p> tags are missing and so are (obvious) the line breaks.
source:
<p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur fringilla nibh non tellus sagittis fermentum. Praesent efficitur turpis ac mauris congue porttitor. Cras eu lectus vitae mauris ultrices laoreet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur fringilla nibh non tellus sagittis fermentum. Praesent efficitur turpis ac mauris congue porttitor. Cras eu lectus vitae mauris ultrices laoreet.</p><p>Aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur fringilla nibh non tellus sagittis fermentum. Praesent efficitur turpis ac mauris congue porttitor. Cras eu lectus vitae mauris ultrices laoreet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur fringilla nibh non tellus sagittis fermentum. Praesent efficitur turpis ac mauris congue porttitor. Cras eu lectus vitae mauris ultrices.</p><p>Lorem lass aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur fringilla nibh non tellus sagittis fermentum. Praesent efficitur turpis ac mauris congue porttitor. Cras eu lectus vitae mauris ultrices laoreet.</p>
frontend: URL: http://www.wpcon606.pw/vacature/hr-medewerker/ (txt right below the logo)
Hope you can help.
C.
This is probably too late for you, carl-w, I had a similar problem and found the following worked.
I was using the_field(‘fieldname’) which displayed the text content all on a single line.
Instead, use this…
echo wpautop( get_field(‘fieldname’) ) which then correctly used the line breaks in the original submitted text content.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.