Home › Forums › General Issues › Querying by Post Object value › Reply To: Querying by Post Object value
If you are still ordering by a single meta field you can still to that without a lot of work. I think this will work.
$byartist_args = (array(
'numberposts' => -1,
'post_type' => 'Event',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'artist',
'value' => get_the_ID(),
'compare' => '=',
),
array(
'key' => 'event_date',
'compare' => 'BETWEEN',
'type' => 'DATE',
'value' => array($date_1, $date_2),
),
),
'meta_key' => 'event_date'
'orderby' => 'meta_value_num',
'order' => 'ASC',
'nopaging' => true
));
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.