Last updated July 11, 2026, Version 0.34
Filters the resolved event archive mode.
Lets plugins pin a post type’s archive to upcoming, past,
or none programmatically — including overriding the Event
Archive setting for gatherpress_event. Returned values
outside the valid set are coerced to upcoming.
Auto-generated Example
add_filter(
'gatherpress_event_archive_mode',
function(
string $mode,
string $post_type
) {
// Your code here.
return $mode;
},
10,
2
);
Parameters
string$modeCurrent archive mode (upcoming,past, ornone).string$post_typePost type being archived.
Files
apply_filters( 'gatherpress_event_archive_mode', $mode, $post_type )