Remove "Category:", "Tag:", "Author:" in the archive title in Zerif

If you want to remove the word category, tag or author from the archive pages then you need to create a child theme. Now add the following code in the functions.php file of your child theme.

add_filter( 'get_the_archive_title', function ($title) {

    if ( is_category() ) {

            $title = single_cat_title( '', false );

        } elseif ( is_tag() ) {

            $title = single_tag_title( '', false );

        } elseif ( is_author() ) {

            $title = '<span class="vcard">' . get_the_author() . '</span>' ;

        }

    return $title;

});

Save the changes and that's it.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us