Limit acf dynamic content field output using twig?

Hi there,

I am trying to limit the length of an ACF field output with DC…
eg. text element with {{dc:acf:post_field field=“work_writing” | u.truncate(10, ‘…’) }}

With reference to this post… (that was truncating post title, not an ACF / Text Area field)…


Charlie suggested using twig - | u.truncate(10, ‘…’)

Does not seem to be working for me.
I have twig enabled and the String Extras ON.

The ACF field is a Text Area field type as it needs to handle line breaks and a fair bit of content.

Any ideas?
eg. Is there another twig function that is needed to convert Text Area to just Text for the u.truncate then to work?

any help much appreciated.
Cheers
Simon

Hello Simon,

Thanks for writing to us.

In order to help you with your concerns, we need to check your settings. I would request please share the admin login details meanwhile, I would suggest you troubleshoot a few of the common issues before we investigate your settings. Please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password
  • Exact page URL

You can find the Secure Note button at the bottom of your posts

Thanks