You might be think it will be better to see your website than it display without category title in blog page or category page of your WordPress website, if you are using WordPress. It is very easy thing to remove category name from the blog post or category page. Let’s see how can we do this.
functions.php
function.php file will help us to achieve this. So, locate the functions.php file in your wordpress installation directory either by cPanel then File Manager option or direct access through ftp clients like filezila. Locate it as belowhtdocs\your-site-name\wp-
function prefix_category_title( $title ) {
if ( is_category() ) {
$title = single_cat_title( '', false );
}
return $title;
}
add_filter( 'get_the_archive_title', 'prefix_category_title' );
Tags:
Wordpress