Development Technology

How to manually remove the word ‘Category’, from Category Title in WordPress

There are many ways to manually remove the word ‘Category’, from Category Title in WordPress but the simplest way is by doing it directly in the functions.php file.

To do this open the functions.php file in your theme and add the following code at the end of the file:

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

Now refresh your category pages and you will see “Category: ” is gone.

Like what your see, Follow Us on Social Media
About the author

Code for the Culture

Code for the Culture is a company that specializes in merging the concepts hip hop, design, and technology. Our online resource focused on displaying the most up to date new and golden age hip hop, art/design, and technology. Much about Code for the Culture is through our development and design parent company CodeCuz (Learn more about CodeCuz)

Leave a Reply

Your email address will not be published. Required fields are marked *