Skip to content

Instantly share code, notes, and snippets.

@vyskoczilova
Last active July 10, 2016 21:00
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 vyskoczilova/1b51a0e8fb7bee00cc459c9265e60e4a to your computer and use it in GitHub Desktop.
Save vyskoczilova/1b51a0e8fb7bee00cc459c9265e60e4a to your computer and use it in GitHub Desktop.
WP - Replace“Category:”, “Tag:”, “Author:” from the_archive_title
<?php
add_filter( 'get_the_archive_title', function ($title) {
// archiv rubriky
if ( is_category() ) {
$title = single_cat_title( 'Archiv rubriky' , false );
// archiv štítku
} elseif ( is_tag() ) {
$title = single_tag_title( 'Archiv štítku' , false );
// archiv autora
} elseif ( is_author() ) {
$title = "Všechny příspěvky od " . get_the_author();
}
return $title;
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment