I’m using get_posts to query posts that have display_on_frontpage = true and sorted by sub fields start_date and start_time. To sum it up:
Posts must have:
display_on_frontpage = true
Sorted by:
event-dates (repeater field): start_date (sub field)
…and then by:
event-dates (repeater field): start_time (sub field)
How can I achieve this?
Hi @garland_briggs
To query post based on the custom field, kindly check our tutorial here: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/. To learn more about the query, please check this page: https://codex.wordpress.org/Class_Reference/WP_Query.
I hope this helps 🙂