If I installed a new WordPress with twentysixteen theme and went to uncategorized page, I will see at the title something like
Category: Uncategorized
how can I remove the category: word from pages titles?
This question already has answers here: How to customize the_archive_title()? (7 answers) Closed 5 years ago.If I installed a new WordPress with twentysixteen theme and went to uncategorized page, I will see at the title something like
Category: Uncategorized
how can I remove the category: word from pages titles?
Share Improve this question asked May 21, 2019 at 5:49 iLinux85iLinux85 1274 bronze badges 01 Answer
Reset to default 0For achieve this title you need to extend get_the_archive_title . here is how or check the official doc
function wpse64458_get_the_archive_title($title){
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
}
return $title;
}
add_filter( 'get_the_archive_title', 'wpse64458_get_the_archive_title');