Home › Forums › Add-ons › Repeater Field › Upcoming events list ordered by date. › Reply To: Upcoming events list ordered by date.
Hi @maira
If you need to order the events based on the date in a repeater, then you need to query the repeater instead of the events. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/querying-the-database-for-repeater-sub-field-values/.
You also need to select the field values based on the current time and remove the duplicated post ID. This page should give you more idea about it: http://stackoverflow.com/questions/4682621/sql-how-to-select-rows-from-a-table-while-ignoring-the-duplicate-field-values.
If you need more help to create the SQL query, please visit WordPress and MySQL community.
I hope this helps 🙂
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.