Home › Forums › Add-ons › Repeater Field › ACF reapeater optimizations
Hi,
About the John Huebner article https://acfextras.com/dont-query-repeaters/
I am using repeater and i don’t see another way to do. So please could you tell me how to optimize ?
Thanks
Usage: Event with multiple date, hour , localtisation
CPT EVENT
ACF reapeater with DATE + HOUR + LOCALISATION
I would need more information.
What types of fields are the sub fields?
What values are stored in these fields?
I don’t understand how you want to be able to search posts by these values, can you give more details?
i have a CPT event.
A single event can have multiple date/time/localisation
So i use ACF repeater for each event with line: DATEPICKER / TIMEPICKER / TEXT
i am just wondering if there is a way to optimize my wpquery
thanks
You’re going to need to explain to me what “localisation” means.
A date picker + a time picker is just a date/time and could be converted to a standard MySQL date for searching. But I have no idea what localisation means of how this will effect how you are searching or what you war searching for. You’ll need to provide details on this.
Also, how you plan to search these dates, will you be searching for exact dates or do you plan to look for dates > or < a date?
Localisation is simple text and i don’t search on it. I don’t search on time only on DATE.
i use ‘compare’ => ‘>=’, and ‘compare’ => ‘<=’, in my query
If all you are searching on is the date sub field and not concerned about the rest then the basic information I gave in the post you references should be all you need. You only need to copy the date field to standard WP meta format.
The topic ‘ACF reapeater optimizations’ is closed to new replies.
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.