After updating to Wordpress 4.1 I've noticed one of my more complex post queries has stopped working. It's querying from an events post type and returning posts with a standard timestamp of after today at midnight, or an end timestamp of after today at midnight (for multi-day events). Here is the query:
query_posts( array( 'post_type' => 'events', 'showposts' => -1, 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' => '_ecmb_datetime', 'meta_value' => strtotime('today midnight'), 'meta_compare' => '>=', 'meta_query' => array( 'relation' => 'OR', array( 'key' => '_ecmb_datetime_end', 'value' => strtotime('today midnight'), 'compare' => '>=' ) ) ) );
I formed this query based on this answer. I had a look at this answer but I am not using
'meta_key' => 'meta_value', and to the part where the answerer says "meta_key isn't needed if you have a meta_query arg" I'm not sure that applies in the scenerio because I do want to query both key/values.
Any help is much appreciated!!