Skip to content

Instantly share code, notes, and snippets.

@congthien
Last active January 12, 2018 06:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save congthien/48b62b2696d57080a0292264ecc7d8d5 to your computer and use it in GitHub Desktop.
Save congthien/48b62b2696d57080a0292264ecc7d8d5 to your computer and use it in GitHub Desktop.
remove category text
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() || is_tax() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
}
return $title;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment