Home Forums Interceptor Category page title

  • This topic has 1 reply, 2 voices, and was last updated 7 years ago by Andy.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1277
    dora
    Participant

    Dear Support, I have a problem with the Interceptor theme.

    When displaying a category page, the page title reads as “Category: Blog”. I would like to show only “Blog”. How is that possible?

     

    Thank You!

    #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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Category page title’ is closed to new replies.