Skip Navigation

[Resolved] Issue when displaying WYIWYG field on front end

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user's WYSIWYG field is not generating the auto paragraphs.

Solution:

What you can do is to use our auto paragraph shortcode.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-autop

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by timd-5 5 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1245937
toolsetissue.png

I am trying to display a custom field on the front end. It's a WYIWYG field. But on the front end, it gets messed up. Lines get attached together, since the <p> or <br /> are missing.

Obviously I could activate the option "Auto-insert paragraphs", but that messes up all the parts of the template where I use HTML.

But there's something super weird going on anyway. When I add this line of code:

[types field='subtext'][/types]

The HTML is missing. But when I add the same line twice:

[types field='subtext'][/types]
[types field='subtext'][/types]

The second time the field is rendered correctly...

How is that even possible? And how do I get a WYIWYG field to work as expected, without using the "Auto-insert paragraphs"?

#1246035

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tim,

What you can do is to use our auto paragraph shortcode.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-autop

Thanks,
Shane

#1246944

Thanks, that did the trick! But I still think it should be looked into. Because

- the WYIWYG should always be displayed in correct HTML (that's why you would use that field type)
- I don't understand why it's displayed differently when you repeat the field twice

But for now, I am happy 🙂