Last active
July 10, 2016 21:00
-
-
Save vyskoczilova/1b51a0e8fb7bee00cc459c9265e60e4a to your computer and use it in GitHub Desktop.
WP - Replace“Category:”, “Tag:”, “Author:” from the_archive_title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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