Home › Forums › ACF PRO › Order CPT by Date Picker then by Time Picker › Reply To: Order CPT by Date Picker then by Time Picker
You’ve got 2 queries in the code and I don’t see the need for the second. Altering the first query in the way I mentioned will order the post by the two fields, there wouldn’t be any need to do additional queries on every date.
Also, this is incorrect
'type' => 'date'
ACF does not store date fields in date format, it stores them like YYYYMMDD
so this query will find nothing that matches the date.
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.