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

Best Premium and Free WordPress Themes Forums AcmeBlog Removing "Category:" from the title of category pages

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.