Query current and future events, ordered by begin date
This happens because of the OR relation on meta_query and the way WordPress generates the actual query string. You need to leave out the meta_key and orderby from the query args and hook into the posts_clauses filter to modify the where and orderby pieces of the query: function wpse_130954_orderby_fix($pieces){ global $wpdb; $pieces[‘where’] .= ” AND … Read more