Support » Theme: Twenty Twenty-One » How to remove “Category” word from title in twentytwentyone

  • Psychic Amelia


    I want to remove word “Category: ” from the category title on category pages.

    I’ve added following function in my functions.php in my child theme but this code doesn’t have any effect. What am I doing wrong or how to fix it with function if possible?

        add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles', 11 );
        function my_theme_enqueue_styles() {
            wp_enqueue_style( 'child-style', get_stylesheet_uri() );
        function amelia_remove_category_title( $title ) {
            if ( is_category() ) {
                $title = single_cat_title( '', false );
            return $title;
        add_filter( 'remove_the_archive_title', 'amelia_remove_category_title' );
    • This topic was modified 5 months ago by Psychic Amelia.
    • This topic was modified 5 months ago by James Huff. Reason: redundant link removed

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff


    Volunteer Moderator

    It looks like you were able to take care of it. 🙂

    Thread Starter Psychic Amelia


    Hello James, I manage to do it by creating template file and not with the filter. I wanted to know why the above filter doesn’t work. To Oliver, I’ve seen that thread before, the CSS route is not the best way. I just wanted to know if something is wrong with the filter method I’ve written above?

    Oliver Campion


    Hi Amelia,

    Your filter doesn’t work because remove_the_archive_title isn’t a valid filter hook as far as I’m aware.


    Thread Starter Psychic Amelia


    Thanks Oli, yes that makes sense. It was solution mentioned on some other website which I copied.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove “Category” word from title in twentytwentyone’ is closed to new replies.