Aleš Sýkora / November 28, 2023 / 1 comments
Solve “No ACF gallery field data found” when the gallery field is empty with Oxygen conditionals
1 min read / Oxygen Builder, Plugins, WordPress / Share on: Twitter, LinkedIn, Facebook
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! :)
- Wrap Gallery with DIV and add class .gallery-wrapper (set the width of div to 100%)
- Open conditionals on the div.gallery-wrapper
- Create conditional: Dynamic Data > Advance Custom Field > Your Gallery Field Name
- Output type – leave empty
- 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. 🍻
Carl
Exactly what I’ve been looking for! Thanks! :)