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
- WP JSON REST API (Ryan McCue) how to query posts with specific meta data with ‘AND’ relation?
- Not getting author rank when using return
- Get attachment by meta_key value
- Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)
- How to query the custom fields by language?
- How do I “get the next 10 posts after post_id == x”?
- Create digital-virtual-downloadable WooCommerce products from the frontend using Gravity Forms? [closed]
- switched from query_posts to WP_query, not working now?
- AJAX search posts and pages
- What is generating my meta og:description?
- DROP TABLE with uninstall hook not working
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- Fetch Record based on meta key dates
- How to display the “ratingValue” and “ratingCount” values ​generated by the KK Star Ratings plugin into my page’s recipe ld+json schema
- How to change this WP_Query to get all ProductIDs and not only specific one?
- get current date + 90 days and checking every day
- how to make members list directory through wordpress post custom meta key.
- How to call WordPress function other files
- Insert content of a post into another
- WP_Query and NULL meta keys
- Large AND OR query timing out
- how to use in custom single.php template using php?
- How can I change the meta_key for a particular piece of information?
- WordPress Post Visibility Options for Frontend
- WordPress page and plugin list using sql query
- How to create a custom shortcode based on the layout?
- Using AJAX to generate front end / viewer end pages
- Bulk update all posts from plugin settings screen
- WooCommerce search products between price range using WP_Query
- 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?
- Meta box losing its value when scheduled post is published
- Mass SQL WordPress Meta Key deletion
- How to Loop Through all Posts and Count Attachments using Get Media Attachments
- Filter posts by comparing custom meta value against postdate
- 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`
- Date format – Meta Box plugin
- WordPress Apply filter in plugin causes 500 internal error
- get meta value from database by post id
- Replacing global wp_query
- Error in pdf generating plugin using FPDF
- How to remove bulk actions from custom post type
- Return multiple values ​in a shortcode attribute
- Adding custom meta boxes to specified custom post type
- How to select a paragraph other than the 1st to be the post’s excerpt?
- WP_Query of custom post type sorted by meta_key has unexpected results
- 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]
- woocommerce search by sku and title ajax
- Loop returns the current page’s permalink and guid instead of the post in the loop
- Search users with custom meta data
- Add user meta after a user has registered and logged In [closed]
- Nested array issue in meta_query
- How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?
- BuddyPress activity on edit post for a CPT
- WP_Meta_Query object with conditionals
- Remember the Meta Value With Radio Buttons
- Query posts by searching for a string in a meta field
- Delete data from custom table when deleting a post
- wp_query for more fields plugin
- Storing values in Post Meta vs new tables
- WordPress filter function using query modifications
- wpdb get_var is not returning any result (verified mysql query returns only one value)
- WP-Snap too slow (caused by WP_Query?)
- WordPress ultra slow if I click on posts?
- Insert data in custom table during new post creation
- Making a Custom Post Type Publish Loop
- Querying meta values within an array
- Include subtitle display to slideshow
- Checking url from plugin [duplicate]
- Add meta tags with a plugin?
- WordPress User Frontend Editing Custom Fields
- Get post id in Post Page within Wp-admin
- Output plugin post like system count [closed]
- getting image alt text via ACF plugin in WordPress [closed]
- WP_Query by meta key not returning any posts
- ‘Active lotteries’ only custom query for woocommerce lottery plugin and elementor
- Update post meta Rest Api
- how to add meta for order in woocommerce
- I want to display data last 7 days with date wise in chartjs?
- Accessing Correct Database to Create REST API Endpoint
- What is the easiest way to create a custom field archive?
- How to disable Yoast meta description for all pages
- WP_Query does not return the result even if the data is present in the database
- Show the author only own types of publications. (JetEngine, Elementor)
- Force post update with React
- How to filter posts with a wp query by a custom dropdown type field with the magic fields plugin
- Query Custom Post Types on Available Dates
- Shipping Refund via Stripe Creates New Order Instead of Updating Original Order
- Elementor: Exclude product categories when using “Source: Current Query”