I’ve configured my products to use the repeater fields to show post objects. I’d now like to query this data and use as a conditional statement, so if a product uses a specific post object within it’s repeater.
ACF does not have have what you’re looking for built in. You’d need to create this yourself, but it could be done.
You’d need to create a function that would look through the repeater field of the post and see if any of the sub fields contains a reference to the post object you’re looking for. The function would need to be built to match all of the fields and relationships specific to you’re post types and custom fields.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users