Created
May 22, 2018 06:10
-
-
Save mediter/de038c094dd4e262c432df10a89e4001 to your computer and use it in GitHub Desktop.
[Remove “Category:”, “Tag:”, “Author:” from the_archive_title] #wordpress #archive #page-title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment