You’re getting all the posts because you set 'meta_key' => 'event_date'.
This is equivalent to adding another subquery into ‘meta_query’ that says “get me all posts which have an event_date custom field, with any value OR that have even_date to $today etc.”.
PS: There are many event plugins out there that have already figured all this stuff out. Give them a try or at least look at their code.
Related Posts:
- Nested meta_query with multiple relation keys
- WP Query Args – Title or Meta Value
- Does tax_query really beats meta_query in all situations?
- ACF Relationship Field Search Filtering [closed]
- Query WooCommerce orders where meta data does not exist
- Query Multiple Post types each with own meta query
- Execute a large WP_Query with many “AND” Meta_Queries?
- Query all posts where meta value is empty
- WP_Query min and max values
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- querying with custom meta field with meta_query
- Order by two meta keys
- multiple meta key but get server load is very high
- A WP_Query that will look for posts after 2 weeks ago OR with a certain meta value
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Order by meta_key in custom post type doesn’t affect the query
- Use meta_query to display events by date in custom field
- Meta-value query
- Meta query field order together with post_date order causes posts without the meta field to be unordered
- How to show recent and upcoming birthdays using meta_query
- pre_get_posts filter meta_query without conflicting existing meta_query
- Undefined property: WP_Query::$post
- Programmatically set ‘meta_query’ for filter
- Using WP_Query and WP_Meta_Query Outside of WordPress
- If two first numbers exist in wp_meta_query value
- WP_Query meta_query >= date
- Extending woocommerce admin product search
- WP_Query on custom field and order results
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- Tax query clause inside a meta query clause?
- Adding an array from a query string to a WP meta_query
- Query multiple meta values
- Optional Meta Query
- Query by multiple meta elements not seeming to work – wordpress is timing out
- How do I make a meta_query OR relation work? [closed]
- Meta_query on same meta key, with diffrenct values
- Can we return all category (not post) with Custom Query Filter? [closed]
- Extend product search with meta in WooCommerce
- How does one perform a sub query with different post types
- how to make members list directory through wordpress post custom meta key.
- WP_Query with meta_query dosen’t return results
- database query with more than a couple meta hangs and doesn’t complete
- How to filter a query by multiple meta keys and order by other meta keys
- Meta Query doesn’t works as espected
- Advanced WP_Query with meta_query, orderby?
- Issues with search after added meta_query
- Sort by presence of thumbnail
- Display posts with specific value first in query
- it’s possible make a WP_Query with math operations?
- Sorting search results with custom dropdown
- WP_Query: apply an SQL function to meta fileld value
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- How to create dynamic value in WP_Query meta_query
- query post by author gender
- How do I add an item to the WP admin menu?
- Multiple meta query from array
- WP_Query with 4 post meta field arguments gives 500 internal server error
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- What’s missing in this wp_query and meta_query
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- Custom meta_query order for Elementor based on post meta key [closed]
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- ElasticPress is (aparently) messing with my search filters
- Meta query ignores multiple values of the key
- Trouble with serialized metadata
- Multiple meta_query not returning rows
- meta_query order by date present -> future then show null
- Check for not NULL not working in meta query
- Get unique post by meta value using wp_query
- Query against multiple locations within single custom post type post
- WP_Query, ACF field and array
- Order by Date Custom Field
- WP Query. Ordering posts by another post types meta
- meta_query compare > not working
- Complex Meta Query
- Get posts meta_query by repater field
- Query 3 meta_key and orderby
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Saving custom fields for WP_Query to retrieve
- meta_query not working with the_content()
- Filter posts/pages by user_role array
- WP_Query with MetaQuery issue
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Get closest event where meta_key field is an array
- WP_Query with meta_value_num and meta_query not paged correctly
- Post Query not working after updating to 4.1
- Orderby Meta Value and Query from Meta Query
- The sorting of posts by a meta_query with two keys fails while separated as single queries it works
- Set right order for query that returns posts based on two custom fields
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- Sort Posts with custom meta key by default which is currently set as optional
- Meta_query weird behaviour
- WP_Query with several meta_query-statements and order by meta_value
- How do I have multiple metaqueries inside one wordpress query
- Use meta query only 3 or more results?
- Display only posts with thumbnails
- WordPress – Optimize the Meta Query for 3 meta keys at a time
- How to use meta_query to retrieve posts from multiple custom post type
- WP_Query filtering in ACF field containing dates