You are correct, this is not possible for serialised data. There are some hacks to try and get around this by searching for individual parts of the serialised string, but those throw up lots of false positives and can’t be sorted.
Generally, it’s an anti-pattern to store structured data inside a single meta value, and you can’t query the internal data in a meta_query field. If you absolutely must store it, store it as JSON, but keep in mind you can’t query or perform logic on the contents. ( serialised PHP values also open you up to object deserialisation attacks, and break when naive search replace queries are ran on the database if the length changes )
The solution here is to separate it out into individual atomic post meta, at least 5, do the sorting in PHP/JS,or to create child post types to represent your events so that you can use the standard date time columns
Related Posts:
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- Making WP_Query limit results by date before today where date is a meta_query
- Create Shortcode shows only posts with custom_field meta
- WP Query Args – search by meta_key or title
- Using meta query (‘meta_query’) with a search query (‘s’)
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Max length of meta_value
- ORDER BY custom field value
- Add custom fields to search
- Matching Serialized Arrays with meta_query
- Meta Query with AND & OR?
- get_pages sort alphabetically by meta value
- Trying to perform complex custom field query with order by set to field value
- Assign/update the custom field value for all posts
- Order by custom field date with ASC order
- WordPress Search Custom Meta Field Only
- Compare meta_query decimals not working right
- Ordering posts by anniversary using only day and month
- Loop through two different sets of custom fields
- How to break meta values into different items and avoid duplicates?
- Slow meta query with multi meta keys
- Using OR in WP_Query negates the “NOT EXISTS” compare
- How can I query on the year part of a complete date in a custom field?
- WP_query : meta_key with custom rule for specific value
- How can I combine meta_query queries?
- Difference between ‘LIKE’ and ‘IN’ in meta queries
- Sorting posts by multiple values, combined
- meta_value_num sort glitch
- WP_Query display next custom post from today’s date
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- WP_Meta_Query causing long-running MySQL queries
- Sorting posts by custom fields in meta_query
- meta_query for a string inside a meta field containing a comma-separated list
- Order by custom field value not working for acf date field
- How to sort category by custom field value
- trim custom field text value and show (…)
- Complex WP_User_Query call fails on production server
- Query post order by post and desc not working
- Meta query with timestamp using WP_query
- Orderby custom field meta value ASC and then by date DESC
- How to wrap meta values seperated by comma in ? [closed]
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- How to add a new meta key and assign timestamp to posts
- Get content from pages with same meta_key from Database
- Run a check for multiple meta key values
- Filter by custom field (meta_key) using JSON API
- WP 3.1 meta_query for multiple custom field values
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Removing link ” from ” on meta_value in custom feilds
- Get posts with same meta value as current post
- Alter main archive, to show posts with meta as last
- Change order of posts
- Use meta_query to get title of associated post
- Ordering posts by custom field named “date” in backend
- get posts where a custom field contains a text
- WP Query – Is this correct?
- Avoiding ACF get_field and returning to core WordPress function
- pre_get_posts : only get posts by wp_usermeta value
- ORDER BY custom field value out of where clause
- comment meta_query for keys that aren’t yet set
- Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months
- meta_value and meta_key filtering returning no posts [closed]
- IF Custom field value equals ZERO
- List custom field values in alphabetical order without repetition
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- Update post meta custom field using block editor
- How to add custom filed value after in wp post title
- change order of images attached to post
- Sortable Custom Columns not sorting correct
- Meta_query ‘compare’ => ‘LIKE’ not working?
- Diamond question mark in text after migrating content
- query_posts with meta_value
- tax query between operator like
- Show array of meta_value in Edit Post Coloum
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- Is it possible to compare the current time with a custom “start” and “end date
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- multiple meta_query and orderby question
- User query – getting values for custom meta keys/fields
- Set class if a meta value is set within post archive
- WP meta_query args not working in function
- Filtering posts by ACF meta query
- Why does my numeric meta query work only on one meta key and not the other?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- meta_query to check all custom fields
- 4 Unique Random Posts based on Custom Field Values
- Create custom query for search?
- Query Posts Via WordPress URL
- Custom Field: Display only if a specific key is selected outside the loop
- Meta_query not filtering posts
- Filter Query Post by Custom Fields(by date)
- Dynamic background image used in css after selector
- Saving multiple custom meta box fields
- get Custom field label (select/dropdown) on front end
- Can I count every article following extracted meta value?
- Best Practice for storing aggregate data by date or other criteria?
- Block Editor – Meta values not saved, meta changes to empty array on update
- Sort posts based on an acf field called fecha value return longtext ‘20240517’
- Query ‘orderby’ when there are multiple values for the same meta_key