Aleš Sýkora / November 28, 2023 / 1 comments

Solve “No ACF gallery field data found” when the gallery field is empty with Oxygen conditionals

Post summary: If you want to hide the gallery field, when your ACF gallery is empty, use this tutorial! :) Wrap Gallery with DIV and add class .gallery-wrapper (set the width of div to 100%)Open conditionals on the div.gallery-wrapperCreate conditional: Dynamic Data > Advance Custom Field > Your Gallery Field NameOutput type – leave emptySet conditional rule…

If you want to hide the gallery field, when your ACF gallery is empty, use this tutorial! :)

  1. Wrap Gallery with DIV and add class .gallery-wrapper (set the width of div to 100%)
  2. Open conditionals on the div.gallery-wrapper
  3. Create conditional: Dynamic Data > Advance Custom Field > Your Gallery Field Name
  4. Output type – leave empty
  5. Set conditional rule to “is_not_blank

Done :)

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

1 comments

Share Your Thoughts