Xila of Dev biznet
9/27/2019 - 2:40 PM

Remove prefix on cat, tag, author and archive

<?php
  function wpc_remove_archive_title_prefix() {
  	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>' ;
		} elseif (is_post_type_archive()) {
			 $title = post_type_archive_title('', false);
		}
  	return $title;
  }
  add_filter('get_the_archive_title', 'wpc_remove_archive_title_prefix');
?>