Last active
November 28, 2017 10:02
-
-
Save vyskoczilova/58ba78eeca237e829424cc424530f73e to your computer and use it in GitHub Desktop.
WP - Remove “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( '', false ); | |
// archiv štítku | |
} elseif ( is_tag() ) { | |
$title = single_tag_title( '', false ); | |
// archiv autora | |
} elseif ( is_author() ) { | |
$title = get_the_author(); | |
} | |
return $title; | |
}); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment