So I discovered the issue. In the Tribe__Events__Rewrite
class there is a method called get_bases()
which sets the slug bases for custom permalinks.
In earlier versions of TEC, the archive base was set by getting the option saved in Events >> Settings >> Events URL slug:
`
$bases = apply_filters( ‘tribe_events_rewrite_base_slugs’, array(
‘month’ => array( ‘month’, $tec->monthSlug ),
‘list’ => array( ‘list’, $tec->listSlug ),
‘today’ => array( ‘today’, $tec->todaySlug ),
‘day’ => array( ‘day’, $tec->daySlug ),
‘tag’ => array( ‘tag’, $tec->tag_slug ),
‘tax’ => array( ‘category’, $tec->category_slug ),
‘page’ => (array) ‘page’,
‘all’ => array( ‘all’, $tec->all_slug ),
‘single’ => (array) Tribe__Settings_Manager::get_option( ‘singleEventSlug’, ‘event’ ),
‘archive’ => (array) Tribe__Settings_Manager::get_option( ‘eventsSlug’, ‘events’ ),
‘featured’ => array( ‘featured’, $tec->featured_slug ),
) );
`
In the new version it’s setting “events” as the slug regardless of what you save in your Events Options:
`
$bases = apply_filters( ‘tribe_events_rewrite_base_slugs’, array(
‘month’ => array( ‘month’, $tec->monthSlug ),
‘list’ => array( ‘list’, $tec->listSlug ),
‘today’ => array( ‘today’, $tec->todaySlug ),
‘day’ => array( ‘day’, $tec->daySlug ),
‘tag’ => array( ‘tag’, $tec->tag_slug ),
‘tax’ => array( ‘category’, $tec->category_slug ),
‘page’ => array( ‘page’, esc_html_x( ‘page’, ‘The “/page/” URL string component.’, ‘the-events-calendar’ ) ),
‘single’ => array( ‘event’, $tec->rewriteSlugSingular ),
‘archive’ => array( ‘events’, $tec->rewriteSlug ),
‘featured’ => array( ‘featured’, $tec->featured_slug ),
) );
`
The solution:
`
function filter_tribe_bases( $bases = array() ){
$rewriteSlug = sanitize_title( Tribe__Settings_Manager::get_option( ‘eventsSlug’, ‘events’ ) );
$bases[‘archive’] = array( $rewriteSlug );
return $bases;
}
add_filter( ‘tribe_events_rewrite_base_slugs’, ‘filter_tribe_bases’ );
`