The query will by default GROUP BY
the post ID, meaning that a post will only appear once in the list. You can remove that GROUP BY
pretty easily with a filter:
add_filter('posts_groupby','__return_empty_string');
$events = new WP_Query($args);
remove_filter('posts_groupby','__return_empty_string');
That might get you what you want. It is a bit hard to tell. Without the GROUP BY
your post should show up multiple times in the list. I suspect that you will still have to loop over the results and organize them to get exactly what you want though.
See:
https://codex.wordpress.org/Function_Reference/_return_empty_string
Related Posts:
- WP_Query() show posts that end later than today
- Filtering a WP_Query meta_query by numeric values isn’t working
- Query current and future events, ordered by begin date
- Stuck in Order by more then one
- Query based on custom fields start and end date
- Order Wp Query by earliest of 3 dates meta query
- WP_Query() displaying past post / event
- Mixing regular and custom post types (with meta_query) on home page
- WP_Query orderby custom field then post_date in one query
- Meta Query “IN” doesn’t work with ACF checkbox filter
- How to sort CPT by custom meta value (date), and return posts month by month
- Using Query Posts With Multiple Post Types And A Taxonomy
- Date query for a custom meta field
- Query by 2 values of a repeater ACF field
- Can’t sort order of wp_query with 2 meta keys
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- Combine tax_query and meta_query in WP_Query
- query order by date on custom type: wrong order
- exclude custom post type by meta key in wp_query
- Display posts if a custom field value is equal to another custom field value
- Filter posts with meta_query NOT IN where value has multiple values
- Get the next event using date_query
- Filtering by Post Meta Custom Fields – Performance
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- Remove duplicated values from a loop
- WP_Query meta_query >= date
- Custom Post Types not showing, custom WP_Query
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- Setting proper query for multiple custom admin filters
- WP_Query: include custom post type only with specific meta value
- Returning a list of custom post types excluding those without a specific meta_value
- wp_query check if integer exists in custom field’s array
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- WP_Query order by custom field, then randomly order some of results
- Troubles with acf/save_post and WP_Query
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- Query custom post type with ACF Date
- How to do WP_Query with two meta fields with orderby clause
- Meta Query Not Returning Output Despite Having Matching Values
- Why is this query not working? (Standard posts + custom post type)
- Order Custom Post Type by Custom Field Value
- Query Custom Post Type Taxonomy term with multiple parameters
- Meta Query posts not showing on ending date of custom field
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Possible to filter custom post type with multiple meta data?
- Order post by date with ACF
- Why is my WP Query not returning first result’s post meta?
- WP_query – Filter by tax_query and meta_query using multiple select
- Getting a custom post’s custom field based on another custom post’s custom field select
- find custom post type post by searching its custom field with my string
- WP_Query of custom post type sorted by meta_key has unexpected results
- Create a WP_Query where if the first value of the first row is equal to the second compare other value
- Group by custom field value (start and end times)
- Query Posts, order by meta value
- WP_Meta_Query object with conditionals
- WordPress giving a 404 page when passing a year argument different than the current year
- Sorting by meta_key different to search criteria?
- Two queries – one with checkbox ticked, one without – comparing meta_query
- How to order query results based on if a custom field has been populated, then the order by the date of the post?
- Create if else for post types in WP_Query ‘post__in’ values
- Sort custom posts by date and then by taxonomy
- Using ACF values in nested WP queries for CPT with date values in the past
- Display post count for a specific month
- Filter result of Custom Post Type using meta_query with ACF
- build child and anchestor three from post parent
- Query posts by current ACF meta key value on single page as related posts
- meta query condition don’t work
- Custom query result empty on page 2
- Use WP_query to match post types based on custom field values
- Filter posts by their related field’s custom field
- ACF meta_key and meta_value break loop
- meta query multiple values for the same key
- Sort custom post archives by a meta value from a different custom post type?
- Custom post types – meta_query: search lesson which starts sooner
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Show specific posts with WP_Query using ACF Post object
- post type => ‘any’ not applied my custom queries
- How to get the posts that my following users are liked?
- Meta_Query refuses to return results
- Linking posts together with Advanced Custom Fields “both ways”
- Not able to get my custom search result using meta_query and tax_query together?
- Custom Field as Custom Post type element class
- Querying, storing, and using data from 2 separate custom post types
- Query events post type after current date and timezone
- Conditional posts in WP_query for search
- Get month and day from a Date Picker custom field
- How to query posts by meta keys AND under specific category?
- Selecting posts older than the current Unix epoch timestamp
- Custom Query With Multiple Meta Key Value
- Custom Post-type not returning the right child_of
- Querying meta values within an array
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Create a list of months based posts
- ACF Field to set Publish Date – Post Duplication upon Update
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- WP Query Conditionally query meta and taxonomy
- WordPress WP_Query Sort by 2 dates – custom fields