Okay
  Public Ticket #2228685
ACF wysiwyg repeater fields shown as plain text
Closed

Comments

  • Patrick Broeknellis started the conversation

    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?




  •  1,194
    Amit replied

    you need to add |raw

    like 

    {{title}}

    should be 

    {{title|raw}}

  • Patrick Broeknellis replied

    Thanks, that solved the problem!

  •  1,194