Hello, I saw a forum post a couple weeks ago asking about conditionally showing/hiding elements based on whether an ACF field is empty or false, etc. Someone responded and said that this was a feature that would be rolling out in the 4.1 release. I didn’t see anything specific to ACF in the 4.1.x change log so I wanted to reach out and see if y’all could elaborate on that. Maybe I’m jumping the gun here, and it will all be revealed in the release notes, but if not, I would very much like to learn how to conditionally display ACF field content based on the value of the ACF field. I’ve been running into many scenarios in which I would like to use the Pro Builder’s ACF field dynamic content, but realize that I cannot because there is no way to test if the field is empty, or to test what value it returns. So I end up having to write up a shortcode to handle all the logic, and then put it in a text or raw content block.
Additionally, I’m hoping for more ACF integration into the dynamic content options:
- Repeater field and Group fields
- Fields that return arrays
- Being able to get fields from options pages that have custom retrieval IDs (when setting up an ACF options page, there is an option for setting a custom ID to use when retrieving the field values… this is very useful when creating options pages for multiple custom post types and setting a retrieval ID of
options_{post_type_slug}
for each… then being able to assign the same field groups to multiple options pages and retrieve them with a dynamic retrieval ID, like on post type index pages for example.)
And a few other feature requests while I’m at it
- Ultimately it would be awesome to have the option to use PHP functions in the element conditions for the most versatility.
- for custom loopers, there is currently the option to use a custom WP_Query string, but I find that whenever I want to run a custom query that can’t be accomplished with the other looper options, it is usually because I need to do a more advanced meta query, or taxonomy query, which cannot be done using the query string. So it would be really nice to have the ability to enter a custom WP_Query object, allowing for the full capabilities of that class.
- I would love to have the ability to create “global blocks” that did not require the Section/Row wrappers. It would be great to be able to create stand-alone div and element “global blocks” that could be edited/managed in one place, but update everywhere that they existed in the site.
Anyway. I’m loving all the new features in Pro. Keep up the great work. Cheers!