Try with this.
'meta_query' => array(
array(
'key' => 'event_date',
'value' => date('Y-m-d'),
'type' => 'date',
'compare' => '<='
)
hope is useful for it.
Related Posts:
- Can wp_query return posts meta in a single request?
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- How can I use order_by to order by two meta_keys without excluding posts that don’t have those keys initialized?
- Function in array as arguments for WP_Query
- WP_Query to show post from a category OR custom field
- Sorting posts by custom date fields (non standard date format)
- Getting attachments by meta value
- meta_query where value is equal to given value
- Get_post() with meta_key when compare is a date
- querying with custom meta field with meta_query
- Group posts by custom field
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- getting posts and number by specific meta value in multiple meta
- How to query using a combination of custom_field values?
- Sorting Posts by custom field
- Order posts by date and then by custom field
- Revolution Slider Orderby Two Custom Fields
- Query two post types and order by two different date fields
- WordPress altering my custom query, How to fix it?
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Order by meta_key in custom post type doesn’t affect the query
- How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
- meta_key and meta_value not working together
- How can i make WP_Query return post image and categories?
- Custom Field sort not working (WP 3.8.1)
- wp_query with multiple custom fields
- How add a custom posttype name using ACF field to a query post array
- Filtering posts by custom field value not working
- Display link to taxonomy archive only if it has posts with certain custom field values
- getting posts and number by specific meta value in multiple meta
- meta_query weird behaviour, static int will work, but not user data
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Woocommerce Shortcode which displays a table with product data
- Query ACF relationship field – Comparator IN – Value array
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- How do i create a custom post query when the meta value is an array?
- How to add a “base” filter for all posts visible to visitors on the site?
- Sort custom post by custom field if none order by latest release
- display ACF repater field in archive page
- Query posts by post type, author and post meta
- How to use the Term Object from a custom select field in a query
- WP Query – grouping posts by same meta key, adding together values from another key
- Retrieve all custom field values of a specific custom field metakey as an array, inside WP_Query
- meta_query is overriding default search
- Trouble with serialized metadata
- Categories In English version showing not canonical URL, instead shows query search result
- Comparing Meta Field date in WPQuery using Meta_Query?
- Getting posts by custom field value
- Query against multiple locations within single custom post type post
- Query post by Category and custom file (ACF)
- WP_Query, ACF field and array
- Problem with my loops
- Order 2 meta_queries differently in WP_Query?
- Order by Date Custom Field
- ACF Post Object meta-query by title not ID
- Sort posts on custom field AND after that sort on date?
- using custom meta user data to run queries in WordPress
- Order posts by title and custom field value?
- From admin edit user page query either the user_nicename or username field value of the user profile being edited or viewed
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- How to create URL parameters to run custom queries?
- List users by Year of Birth using a foreach loop to dynamically populate years and data
- Meta key in wp_query bug?
- Custom WP_query and integrating into theme file
- Query by Category and Custom Field – Shortcode
- Wrap group of wp query posts to parent div by date/year
- Querying posts with meta key and meta value not returning anything
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Sorting posts by meta values: 2 different orders
- WP_Query with Pagination and orderby meta_value_num showing duplicates
- Order Custom Field by Price
- Mathematical operations on custom field values? (updated)
- WP_Query to show post from a category OR custom field – Not 100% answered
- Compare meta key separation
- WP_Query a custom field value bringing back 0 results
- Sorting Posts with meta value not working
- Order by three custom fields (Y-m-d), then separate into yearly sections
- Custom search (wp query by custom fields)
- Loop through multiple custom fields with increasing number
- How do I display posts with specific value in a custom field into my loop?
- new WP_query using custom fields
- Custom Search Query – include only custom fields and title
- query_posts with sorting on a custom datestamp
- query post based on comparison
- Query posts filter not working
- Display all custom meta field values from the database using ACF Repeater
- Taxonomy related query not working
- Get posts by meta value except one post [closed]
- WP_Query – order with usort by custom meta
- Best performance for use Custom Field in WP
- WP_Query sort by ACF date field (newest first) with blank dates first
- How to include custom fields in wordpress search
- Extend search query to search meta keys values based on search string
- Sort wp_query of two post types using meta datefield for one and date for the other – possible?
- How to get products with the same custom attribute like ean code
- Order by multiple custom fields within woocommerce hook for catalog ordering (woocommerce_get_catalog_ordering_args)