Comments Patrick Broeknellis started the conversationNovember 28, 2019 at 2:20pmI have several ACF wysiwyg repeater fields.Now I want to show the contents of the wysiwyg repeater fields in a widget. Custom widget is created and I have shown the ACF wysiwyg repeater fields.So far so good.But when using the custom widget, the HTML created by the ACF wysiwyg fields are not shown as HTML but as plain text.For example:I have created an ACF repeater field with 2 subfields:- "titel" as a text field- "inhoud" as a wysiwyg fieldIn my widget I am using this HTML:{% for item in current_post.cf_reisinformatie_algemeen %}<div class="content"><h2>{{item.titel}}</h2>{{item.inhoud}}</div>{% endfor %}When viewing the post on the website, the content of the wysiwyg widget is not shown as HTML, but as plain text.In this wysiwyg field I have entered 2 paragraphs:This is paragraph 1This is paragraph 1When this post is viewed on the website, this wysiwyg field is then shown as:<p>This is paragraph 1</p> <p>This is paragraph 1</p>What to do to have the ACF wysiwyg repeater field shown as HTML in stead of plain text? 1,194Amit repliedNovember 28, 2019 at 3:04pmyou need to add |rawlike {{title}}should be {{title|raw}}Patrick Broeknellis repliedNovember 28, 2019 at 3:20pmThanks, that solved the problem! 1,194Amit repliedNovember 28, 2019 at 3:21pmcan u help us with 5 stars here https://wordpress.org/support/plugin/unlimited-elements-for-elementor/reviews/ Sign in to reply ...
I have several ACF wysiwyg repeater fields.
Now I want to show the contents of the wysiwyg repeater fields in a widget. Custom widget is created and I have shown the ACF wysiwyg repeater fields.
So far so good.
But when using the custom widget, the HTML created by the ACF wysiwyg fields are not shown as HTML but as plain text.
For example:
I have created an ACF repeater field with 2 subfields:
- "titel" as a text field
- "inhoud" as a wysiwyg field
In my widget I am using this HTML:
{% for item in current_post.cf_reisinformatie_algemeen %}
<div class="content">
<h2>{{item.titel}}</h2>
{{item.inhoud}}
</div>
{% endfor %}
When viewing the post on the website, the content of the wysiwyg widget is not shown as HTML, but as plain text.
In this wysiwyg field I have entered 2 paragraphs:
This is paragraph 1
This is paragraph 1
When this post is viewed on the website, this wysiwyg field is then shown as:
<p>This is paragraph 1</p>
<p>This is paragraph 1</p>
What to do to have the ACF wysiwyg repeater field shown as HTML in stead of plain text?
you need to add |raw
like
{{title}}
should be
{{title|raw}}
Thanks, that solved the problem!
can u help us with 5 stars here
https://wordpress.org/support/plugin/unlimited-elements-for-elementor/reviews/