Created
September 16, 2015 02:43
-
-
Save designbuildtest/9c044f3ca4e79b45bc2f to your computer and use it in GitHub Desktop.
Customize the_archive() title output.
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
| function dbt_custom_archive_title() { | |
| if ( is_category() ) { | |
| $title = single_cat_title( '', false ); | |
| } | |
| elseif ( is_tag() ) { | |
| $title = single_tag_title( '', false ); | |
| } | |
| else { | |
| $title = post_type_archive_title( '', true ); | |
| } | |
| return $title; | |
| } | |
| add_filter( 'get_the_archive_title', 'dbt_custom_archive_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment