WordPress custom post type with meta – how to retrieve with wp_query

I developed simple plugin and now would like to get only posts where start_date $now so I have to add meta_query to the args but how should it look like?

$args = array(
‘post_type’ => ‘events’,
‘post_status’ => ‘publish’,
‘meta_query’ => array(
array(
// start_date > now & now < end_date
),
),
);

How can i achieve this ?

Read more here:: WordPress custom post type with meta – how to retrieve with wp_query

Leave a Reply

Your email address will not be published. Required fields are marked *