Last active
February 3, 2017 21:38
-
-
Save halusdm10/bbd2524c1f89a4d5f8acced20e1e3a66 to your computer and use it in GitHub Desktop.
How to remove the word Category: In the category?
This file contains hidden or 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
| add_filter( 'get_the_archive_title', function ($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; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment