I just found the problem, though I cannot explain why or how things went the way they did – the date to compare events by had the wrong date format: date( 'd-m-Y' )
should have been date( 'Y-m-d' )
.
The comparison worked until the update, so something must’ve changed about the way WordPress stores date input.
Related Posts:
- filter search result with custom post type meta key
- Meta Query “IN” doesn’t work with ACF checkbox filter
- Can’t sort order of wp_query with 2 meta keys
- Using meta_query, how can i filter by a custom field and order by another one?
- Mixing regular and custom post types (with meta_query) on home page
- Get posts based on meta key/value
- How to create a wp_query that contains both meta_query and tax_query
- $query->set in pre_get_posts is unintentionally affecting the backend
- WP_Query orderby custom field then post_date in one query
- Filtering a WP_Query meta_query by numeric values isn’t working
- Add Custom Post Type to Current Query
- Ordering posts having multiple post-meta date fields
- How to show more posts on an archive page?
- Include post id[s] into WP_Query()
- Querying custom post type with 2 custom fields (date-range)
- Pre get posts for single post
- How Can I save multiple records in same meta key?
- Order Posts by Taxonomy and Meta Value
- Pre_get_posts Gives 404 on Custom Post Type
- Order posts by (hierarchical custom) taxonomy terms and term children
- Using Query Posts With Multiple Post Types And A Taxonomy
- query order by date on custom type: wrong order
- Display all Posts and only certain Custom Post Types with meta fields
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Display custom post type taxonomy and month
- Filtering by Post Meta Custom Fields – Performance
- Ignore sticky posts if post is not in meta query
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- Query that joins the postmeta table twice
- Issue with pre_get_posts on custom post type archive pages
- How to sort custom post type posts in default order by multiple fields?
- Custom post type show on both Home and Date Archive
- pre_get_posts on custom post type
- Pull a post based on a meta value in a custom post type
- Setting proper query for multiple custom admin filters
- Sorting Custom Post Type by Meta Value but wont display when set to 0
- Returning a list of custom post types excluding those without a specific meta_value
- How to modify archive query with pre_get_posts to append CPTs?
- Multiple meta_values in the pre_get_posts filter?
- Get posts between custom dates
- Custom post type search using $_SESSION and pre_get_posts
- filter custom post type by meta key in dashboard
- How to filter wp_list_categories output with some custom post type meta query?
- Display a CPT based on a metabox selection
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- How to do WP_Query with two meta fields with orderby clause
- Meta Query Not Returning Output Despite Having Matching Values
- WP Meta query for a custom post type based on two values
- Using meta_query and tax_query at the same time
- filter search custom field query
- Main menu not appearing in custom post type archive
- Getting a custom post’s custom field based on another custom post’s custom field select
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Get category if used in a custom post type
- If meta_value of meta_key is less than today’s date update meta key
- fetch custom post by meta key if key value is does not know
- Query Posts, order by meta value
- WordPress giving a 404 page when passing a year argument different than the current year
- Two queries – one with checkbox ticked, one without – comparing meta_query
- pre_get_posts works in post type archive but not in single post
- Order posts by taxonomy terms
- Order admin post list table by meta field, and have posts without the meta field always be at the end of the list
- Using OR relation in meta_query to check for a value before sorting by another
- Query to Exclude Child Pages from Custom Post Type Archive
- Filter result of Custom Post Type using meta_query with ACF
- How do I troubleshoot pre_get_posts with Debug Bar?
- Update main post with same category when creating custom post to update the modified date
- meta_query Where the key value is stored as an array
- Orderby if between two meta fields
- ACF meta_key and meta_value break loop
- Display Specific Posts at Start of Loop
- Sort custom post archives by a meta value from a different custom post type?
- Custom post types – meta_query: search lesson which starts sooner
- List all posts associated under custom taxonomy
- post type => ‘any’ not applied my custom queries
- How to get the posts that my following users are liked?
- Sort loop by custom field from different post type
- Meta_query by date for Events archive
- pre_get_posts gives 404 error on Custom Post
- What’s the most efficient way to get two queries based on an if statement?
- Querying, storing, and using data from 2 separate custom post types
- pre_get_posts with multiple post types AND a meta_key
- Selecting posts older than the current Unix epoch timestamp
- Fetch post meta in the same query as the main loop
- Problem to show custom post type in archive page category wise
- Using $seed on a custom post type for randomly displayed posts
- Adding custom post types to the default loop, yet only posts that has terms from the core taxonomies
- Custom Query With Multiple Meta Key Value
- How do I sort post listing by child post count?
- loop through custom post-type with two meta_keys
- Querying meta values within an array
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- add_filter > posts_where works partially
- Get Posts ordered by a date custom meta field
- Function to Compare CPT Post Custom Value with Default Posts CF Value
- WP Query Conditionally query meta and taxonomy
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Sorting by Title for Post Archive Categories for Custom Post Type
- Meta_query question
- How can I incldue a “private” post type in a loop for public users?