WordPress remove Category from Title

If you want to remove “Category” from the title in WordPress add this function to your child theme:

add_filter( 'get_the_archive_title', function ($title) {
  if ( is_category() ) {
    $title = single_cat_title( '', false );
  }
  return $title;
});

You may also like...