Title: Wp_query Sort
Last modified: June 16, 2023

---

# Wp_query Sort

 *  [charcoaldev](https://wordpress.org/support/users/charcoaldev/)
 * (@charcoaldev)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/wp_query-sort-2/)
 * How to sort using meta_query?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Marc Bellêtre](https://wordpress.org/support/users/marcbelletre/)
 * (@marcbelletre)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/wp_query-sort-2/#post-16830247)
 * Hi [@charcoaldev](https://wordpress.org/support/users/charcoaldev/),
   Thank you
   for the 5-stars review 🙂
 * It depends what you want to query but my guess is that you would like to query
   the start and/or end dates of a recurrence. The plugin itself doesn’t store theses
   values into a separate fields but what you can do is writing a callback function
   on the acf saved post hook that sets the start and end dates of the period into
   meta fields.
 * There is a thread on this forum about this. Is wrote a detailed answer here: 
   [https://wordpress.org/support/topic/example-for-custom-wp_query-some-problems-with/#post-16705578](https://wordpress.org/support/topic/example-for-custom-wp_query-some-problems-with/#post-16705578)
   
   Cheers,Marc

Viewing 1 replies (of 1 total)

The topic ‘Wp_query Sort’ is closed to new replies.

 * ![](https://ps.w.org/acf-rrule-field/assets/icon-256x256.png?rev=2498015)
 * [ACF RRule Field](https://wordpress.org/plugins/acf-rrule-field/)
 * [Support Threads](https://wordpress.org/support/plugin/acf-rrule-field/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-rrule-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-rrule-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-rrule-field/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marc Bellêtre](https://wordpress.org/support/users/marcbelletre/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/wp_query-sort-2/#post-16830247)