Display only if ACF has content

Hello,

I have multiple authors and biographies to display on my blog. Every author and its biography are being pulled from a post ACF field. I would like to display the DIV that contains let’s say author-2 and bio-2 only if the corresponding field has been filled. Can you help me achieve that?

Best,
Robert

Hello Robert,

Thanks for writing to us.

I would suggest you go to the element and set the conditions like this
{{ acf.post_field({"field":"your_meta_key"}) }} IS NOT ''. Please have a look at the given screenshot below.


Please feel free to change the ACF meta key to the dynamic content code.

Hope it helps
Thanks

It works. Thank you!

You’re welcome, Robert.