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
- Display products from specific category in shop page
- WP_query parameters for date range
- Getting attachments by meta value
- insert data in database table from plugin with WP3.1
- Update Multiple Post Meta for the Same Post In One call?
- WP_Query not working as expected for attachments and custom meta_query
- WordPress altering my custom query, How to fix it?
- Updating post meta for custom post types
- How can I add a custom meta value on file upload?
- How to count number of records found in a database table?
- How to get custom field image url of specific size
- Is it possible to filter the wp_footer() scripts, read the content, and insert them inline?
- Advanced Custom Fields query
- How do I add advanced custom fields / meta fields to Elasticsearch? [closed]
- Can I run multiple queries with $wpdb->prepare?
- Add multiple attributes to product from php
- Make the checkbox meta field checked by default
- WP_Query ordering numbers as letters
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- WooCommerce shop page orderby [closed]
- Not getting author rank when using return
- How do I “get the next 10 posts after post_id == x”?
- 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
- get current date + 90 days and checking every day
- how to make members list directory through wordpress post custom meta key.
- How to create a custom shortcode based on the layout?
- Using AJAX to generate front end / viewer end pages
- WooCommerce search products between price range using WP_Query
- 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
- 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
- WordPress Apply filter in plugin causes 500 internal error
- Error in pdf generating plugin using FPDF
- How to remove bulk actions from custom post type
- Return multiple values ​in a shortcode attribute
- WP_Query of custom post type sorted by meta_key has unexpected results
- 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]
- How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?
- Query posts by searching for a string in a meta field
- Delete data from custom table when deleting a post
- Pagination not working
- How to find the WordPress Nextgen galleries which are not used in WordPress posts?
- 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?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- How to search post titles with whole words only, but not the exact word only?
- Use get_pages() before another plugin modifies it
- Help to Create a Simple Plugin to make a post
- How do i create a custom post query when the meta value is an array?
- How to Join wp_posts & wp_postmeta table using custom query
- What database state changes happen after a post is manually “updated” with no changes?
- Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /../plugins/rm-payment.php
- Use WP_query to match post types based on custom field values
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Custom Field used to allow a Free Story; no longer works
- Get and Update Most Meta Value as an array in HTML form
- Query against multiple locations within single custom post type post
- Only return taxonomies that are linked to a category & product
- How to add specific posts to specific pages in WordPress?
- How to use information from the database in the front-end?
- User Following System
- ACF Query result in a new td (echo)
- Get value from an input field and pass into update_meta_data as $meta_value
- Multiple Meta key in search
- Efficient way of querying for a “fallback” post?
- History of page, interval of years
- WP Meta Query at depth 2
- How can I make my plugin display custom post meta data on the front end?
- Plugin does not create a custom table upon activation
- Return a single custom post from multiple meta queries
- Second foreach loop breaking (Posts2Posts)
- Ger posts from similar tags and categories
- 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
- Include subtitle display to slideshow
- Checking url from plugin [duplicate]
- getting image alt text via ACF plugin in WordPress [closed]
- WP_Query by meta key not returning any posts
- Update post meta Rest Api
- how to add meta for order in woocommerce