Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #107819
    hellohillory
    Participant

    Hi there,

    I’m working in the Helena theme and I was just wondering how to remove the word “category” from the title on certain pages for my blog? For example, I want the title of one page to be “DIY”, however the title is automatically “Category: DIY”

    http://firsttimethings.com/category/diy/

    Let me know if there’s anything I can do!

    #107862
    Mahesh
    Participant

    @hellohillory: For this, you’ll need to create child theme. You can find more details on creating child theme HERE. Then add the following code in your child theme’s functions.php.

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

    Regards,
    Mahesh

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Remove word "category" from category pages’ is closed to new replies.