Hi All,
Sorry if this is redundant. I searched through everything a ton but can’t seem to figure it out.
I’ve got a group that has a start and end date. I’d like to order by the start date. The group’s name is showit_event_dates and the start date is start_event.
I’ve tried the way that ACF uses:
$args = array (
'post_type' => 'showit_events',
'posts_per_page' => $num_posts,
'orderby' => 'meta_value',
'meta_key' => 'start_event',
'order' => 'DESC'
);
And by also using the meta_query instead of meta_key:
$args = array (
'post_type' => 'showit_events',
'posts_per_page' => $num_posts,
'orderby' => 'meta_value',
'meta_query' => array(
array(
'key' => 'start_event',
'value' => date('F j'),
'type' => 'DATE',
'compare' => '=',
)
),
'order' => 'DESC'
);
Neither renders anything. I’m guessing because the dates in the group are treated as arrays???
Any help would be amazing. I’ll attach my date settings.