Home › Forums › General Issues › Meta_query key for nested fields › Reply To: Meta_query key for nested fields
You cannot do a query like this on repeater fields.
The actual field keys are build, for example for sales=>different_regions=>start_date, like this
"sales_{$row_index}_different_regions_{$row_index}_start_date"
This cannot be accomplished using WP_Query.
In addition to this there isn’t any way to do any type of a query that will associate the indexes used for start_date with the indexes used for end_date. This is simply not possible in an SQL query.
Here is an example. Lets say that you have these start and end dates in the repeater, these are just examples and not necessarily what is stored in the db.
January 1, 2022 => February 1, 2022
March 1, 2022 => April 1, 2022
if today was February 10, 2022
then this post would match because this date is between one of the start dates and one of the end dates.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.