Calling an ACF WYSIWYG field using Twig in a text element vs. original dynamic content call

Not exactly sure how to word this, but when I use the original dynamic content call of {{dc:acf:post_field field=“transcript”}} I get properly formatted text as shown below…

But when I use the new Twig call of {{ acf.post_field({“field”:“transcript”}) }} I don’t get the formatted text (is show’s the html tags in the text) as shown below…

Is there maybe a setting in the theme options or preferences that I need to adjust?

When Autoescape is enabled any Twig statement that outputs HTML will be escaped like you see there. Using the |raw filter will bypass this for anything you know will be safe. You would add the following Dynamic Content you see below for your ACF field. I’ll add some info about this in the Twig docs eventually for this. Have a great day.

{{ acf.post_field({"field":"transcript"}) | raw }}

Amazing! Thank you.

1 Like

You are most welcome @designerkev

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.