Taxonomy Archive Template not working after term_link filter used to rewrite slug

Browser: Chrome/Brave
OS:Windows 10
URL: n/a

[Moved from How-to to Bugs]


I have a taxonomy that I have created an archive template for in Bricks.

Before rewriting the taxonomy slug the template works fine. After rewrite the template doesn’t load and instead I get the 404 page as its looking for a page and not the template (presumably).

I have used term_link as in an example from the wordpress docs, similar to this:

function wpdocs_change_course_category_link( $url, $term, $taxonomy ) {
	if ( 'course_category' !== $taxonomy ) {
		return $url;

	return str_replace( '/course-category/', '/', $url );
add_filter( 'term_link', 'wpdocs_change_course_category_link', 10, 3 );

The rewrite works fine and taxonomy slugs are now as I want them.

How do I get the Bricks archive template for the taxonomy to recognise the new slug format?

I have flushed permalinks/rewrite rules by saving permalink settings.

Thanks :slight_smile: