• I wanted to sort my blog posts by category and display each category on a different page. I was successful in doing so, but now the word “Category” shows up next to the name of the actual category when I go to that page. How can I make the word “category” go away.

    site is theminnowbucket.net

    thanks!

    colby

Viewing 3 replies - 1 through 3 (of 3 total)
  • mtwain

    (@mtwain)

    Try

    add_filter( ‘get_the_archive_title’, ‘change_archive_title’ );

    function change_archive_title( $title ) {
    if ( is_category() ) $title = str_replace( ‘Category:’, ’’, $title );
    if ( is_tag() ) $title = str_replace( ‘Tag:’, ”, $title );
    return $title;
    }

    in the function.php

    Cheers 🙂

    Thread Starter colbyproffitt

    (@colbyproffitt)

    hi mtwain, thanks for the help. I am very new to html – can you specify where I should add this code? which file and whereabouts in the file?

    Just inside the body after a closing }.

    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I remove "category" from the title’ is closed to new replies.