- This topic has 1 reply, 1 voice, and was last updated 6 years, 4 months ago by shap.
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- January 22, 2018 at 1:54 am #4645shapParticipant
Sorry for my English 😉
I have a problem.
How do I delete the “Category:” text displayed in the title in the page header (in the category posts)? Now “Category: News” is displayed, I would like to display the same “News”.February 4, 2018 at 6:49 pm #4670shapParticipantHow to remove “Category:” from category title
It’s easy to do that. Simply 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.
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.