I have a custom post type which stores dates in a meta field as
I can use
WP_Query to find posts created in a certain month / year
$args = array( 'post_type' => 'custom_post', 'post_status' => 'publish', 'date_query' => array(array( 'month' => $month, 'year'=> $year, ),), ); $query = new WP_Query($args);
How can I extend this to search a date meta field? I know you have to add
'meta_query' => array(array( 'key' => $key, 'value' => $val, ...etc... ),),
Can I search for custom posts using a date field or do I have to manually filter once I get all the returned custom posts?