Skip to content

Instantly share code, notes, and snippets.

@Steeru
Created March 30, 2018 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Steeru/3a89a2ca3b6f8f6a1dd7bf65f3b811ec to your computer and use it in GitHub Desktop.
Save Steeru/3a89a2ca3b6f8f6a1dd7bf65f3b811ec to your computer and use it in GitHub Desktop.
function travel_log_child_remove_cat_titles($title) {
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>' ;
}
return $title;
}
add_filter( 'get_the_archive_title', 'travel_log_child_remove_cat_titles' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment