сам решил задачку. решение:
add_filter( 'events_group_rewrite_rules', 'namespace_events_group_rewrite_rules' );
function namespace_events_group_rewrite_rules( array $rules ): array {
$terms = get_terms(
[
'taxonomy' => 'events_group',
'hide_empty' => false,
]
);
$slugs = wp_list_pluck( $terms, 'slug' );
$slugs_pattern = '(' . implode( '|', array_unique( $slugs ) ) . ')';
$new_rules = [];
foreach ( $rules as $pattern => $query ) {
$pattern = str_replace( 'events_group/([^/]+)', $slugs_pattern, $pattern );
$new_rules[ $pattern ] = $query;
}
return $new_rules;
}
add_filter( 'term_link', 'namespace_events_group_term_link', 10, 3 );
function namespace_events_group_term_link( string $termlink, \WP_Term $term, string $taxonomy ): string {
if ( 'events_group' === $taxonomy ) {
$termlink = str_replace( 'events_group/', '', $termlink );
}
return $termlink;
}
везде "events_group" замените на свою таксономию. Удачи)