Removing "Category:" from the title of category pages - Acme Themes

Home Forums AcmeBlog Removing "Category:" from the title of category pages

This topic contains 2 replies, has 2 voices, and was last updated by  acmethemes 2 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5099

    tenblog
    Member

    Hey guys could you help me by providing the CSS code to remove the words “Category:” from my category pages? So on this page for example it would just say “Menswear”
    http://www.tenblog.net/category/menswear/

    Thanks

    #5100

    acmethemes
    Keymaster

    Hello tenblog,

    Please use the following filter hook in the child theme functions.php

    add_filter( 'get_the_archive_title', function ($title) {
    
        if ( is_category() ) {
                $title = single_cat_title( '', false );
            }
        return $title;
    
    });

    Best Regards,
    Acme Themes

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Removing "Category:" from the title of category pages’ is closed to new replies.