How can I output a straight list of events like posts (without the request query vars)?
My problem is if I have a single event which recurs every month for a year, the event list shows all the repeats.
If I group occurrences then it will only show the first one (january), which is no good if we are half way through the year, and recurring events which have past still appear in the archive.
I have been trying to output a straight list of the events ( like the admin list ) but the query vars always interfere and I cant find any way to alter them with pre_get_posts, post_request or any other filter..pulling my hair out!!

Mark Piranha
Hi Mark,
If you group occurrences, it actually shows the earliest date matching the query. As such, if you opt to not include past events in the plug-in settings (there are separate options for widgets/shortcodes) and group occurrences, you should see the next date.

Stephen Harris
Ah right ok, it doesn’t quite work when you view the archive for the current month…if I have a recurring event every Monday, and view the archive for that month halfway through (the month), with no past events and grouped occurrences, it only shows the entry for the first Monday.

Mark Piranha
On the month archive, the ‘don’t show past events’ is ignored, and all events that month are shown (regardless of whether they are ‘past’ or not). This was done to address buggy-behaviour associated with the widget calendar: https://github.com/stephenharris/Event-Organiser/issues/30
You could either, ‘ungroup’ events for day/month/year archives:
function myprefix_dont_group_events_archive( $query ){
if( $query->is_main_query() && eventorganiser_is_event_query( $query ) ){
if( eo_is_event_archive( 'day' ) || eo_is_event_archive( 'month' ) || eo_is_event_archive( 'year' ) ){
$query->set( 'group_events_by', 'occurrence' );
}
}
}
add_action( 'pre_get_posts', 'myprefix_dont_group_events_archive', 15 );
Or perhaps alter the event_start_after
(hook onto pre_get_posts
with priority higher than 10). and change it so that it’s set to the start of day/month/year or today (whichever is later).
$current = $query->get( 'event_start_after' );
$now = new DateTime( 'now', eo_get_blog_timezone() );
$event_start_after = ( $current > $now ? $current : $now );
$query->set( 'event_start_after', $event_start_after );

Stephen Harris