In the meta_query arguments, try changing your
'type' => 'CHAR',
to
'type' => 'DATETIME',
You can opt for any one of these, depending your needs:
type (string) – Custom field type. Possible values are ‘NUMERIC’,
‘BINARY’, ‘CHAR’, ‘DATE’, ‘DATETIME’, ‘DECIMAL’, ‘SIGNED’, ‘TIME’,
‘UNSIGNED’. Default value is ‘CHAR’.
But wait! There’s more! 😉
It seems that The Events Calendar hooks into queries that involve 'post_type' => 'tribe_events'!
You’ll need to add either
'eventDisplay' => 'past',
or
'eventDisplay' => 'all',
to your arguments.
..or, you can also go with
$my_past_events = tribe_get_events(
array(
'posts_per_page'=>999,
'eventDisplay'=>'past',
)
);
and loop through $my_past_events.
Related Posts:
- How to insert multiple postmeta values with one query?
- Meta query for comparing two dates
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- How to delete only user meta value (not key) from usermeta table in wordpress?
- WordPress Meta Query: Relation is not working correctly
- wordpress last all added get meta value by post id
- Order custom post type by posts with most likes first
- Use REGEXP in WP_Query meta_query key
- Getting attachments by meta value
- What is an efficient way to query based on post_meta?
- WP_Query not working as expected for attachments and custom meta_query
- Show the “ratingValue” and “ratingCount” values ​of KK Star Ratings Plugin
- Find out if request is for custom post type archive before query runs
- Can’t sort order of wp_query with 2 meta keys
- How to get sum of meta_values of a meta_key in wp_query according to conditions
- Fatal error: Uncaught Error: Call to undefined function get_userdata()
- Order posts by meta value and Date
- Set attached to state
- How to change ID of an attachment in wp_posts and its related tables correctly?
- Add multiple attributes to product from php
- medoo framework in WP plugin
- WordPress logo upload option in theme panel
- Accessing GET variable named ‘error’
- Get meta info related to current post
- Where to hook my plugin’s action
- Is there a filter for get_post_custom()?
- How can i list random post from multiple category?
- dynamically generating plugin syntax
- Accessing post’s meta data based on user’s click of a post
- How to make Meta Query case sensitive?
- Get attachment by meta_key value
- How to query the custom fields by language?
- AJAX search posts and pages
- How to change this WP_Query to get all ProductIDs and not only specific one?
- How to call WordPress function other files
- WP_Query and NULL meta keys
- Large AND OR query timing out
- how to use in custom single.php template using php?
- WordPress Post Visibility Options for Frontend
- WordPress page and plugin list using sql query
- How to create a custom shortcode based on the layout?
- Bulk update all posts from plugin settings screen
- ACF: post query, hide duplicate values [closed]
- Redirect to another page using contact form 7? [closed]
- Is it possible to retrieve all posts with a certain value for metadata?
- Mass SQL WordPress Meta Key deletion
- How to get a list of bundled products using wp_query in woocommerce
- order posts by `meta_key`, Does not display posts that does not have `meta_key`
- WordPress Apply filter in plugin causes 500 internal error
- Replacing global wp_query
- Adding custom meta boxes to specified custom post type
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- How can I concatenate variables to search results title? [closed]
- Query posts by searching for a string in a meta field
- Delete data from custom table when deleting a post
- WP_Query meta compare must include ALL array values
- Searching a tab/space delimited text file based upon form criteria and returning a ‘record’ into a word press results page
- Why does “updated_post_meta” did not fire when uploading media other than image?
- What snippet do I need to type to show my ACF field show up on my theme?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- get_post_meta shortcode returns empty field
- Add an action based on custom post meta field
- Meta query ignores multiple values of the key
- adding dynamic/multiple slug values in ‘option_none_value’
- Trouble with serialized metadata
- How to get a specific string from a url
- Custom Field used to allow a Free Story; no longer works
- How to pass multiple custom fields as shortcode’s parameters
- Checkbox field that add a subscription product and change prices of other products in checkout and cart page
- Query against multiple locations within single custom post type post
- Is it possible to custom set query for a WordPress REST API response?
- How to create meta fields with more than 1 relation?
- Only return taxonomies that are linked to a category & product
- How to add specific posts to specific pages in WordPress?
- User Following System
- ACF Query result in a new td (echo)
- Multiple Meta key in search
- wp_schedule_event function reference
- Saving custom fields for WP_Query to retrieve
- Efficient way of querying for a “fallback” post?
- Same Title on two different post type with single custom taxonomy
- How can I make my plugin display custom post meta data on the front end?
- WP_Query Posts by Metadata from Option Tree
- How can i see/log all requests coming from a registration form (not from the UI)?
- Second foreach loop breaking (Posts2Posts)
- Advanced Custom Fields (ACF) Plugin – Random Image in Sidebar
- Ger posts from similar tags and categories
- wp_query for more fields plugin
- wpdb get_var is not returning any result (verified mysql query returns only one value)
- Making a Custom Post Type Publish Loop
- Querying meta values within an array
- Include subtitle display to slideshow
- Add meta tags with a plugin?
- WordPress User Frontend Editing Custom Fields
- WP_Query by meta key not returning any posts
- Update post meta Rest Api
- how to add meta for order in woocommerce
- How to disable Yoast meta description for all pages
- Show the author only own types of publications. (JetEngine, Elementor)
- How to filter posts with a wp query by a custom dropdown type field with the magic fields plugin