Home Forums Interceptor Category page title Reply To: Category page title

#1279
Andy
Keymaster

Install and activate the Interceptor Child theme (link: https://uxlthemes.com/docs/child-themes/ ), and then in the child theme functions.php file add this code:

add_filter( 'get_the_archive_title', function ($title) {
    if ( is_category() ) {
            $title = single_cat_title( '', false );
        } elseif ( is_tag() ) {
            $title = single_tag_title( '', false );
        } elseif ( is_author() ) {
            $title = '<span class="vcard">' . get_the_author() . '</span>' ;
        }
    return $title;
});

It is not recommended to add this code to the parent theme functions.php file as when the parent theme is updated, your changes will be lost.

This code will also remove “Tag:” and “Author:” as well as “Category:” from your archive page titles, and will work with any theme.