Created
January 26, 2015 16:26
-
-
Save MaruscaGabriel/ea258f89ac862af6ff5a to your computer and use it in GitHub Desktop.
Automatically display titles on category, tag and taxonomy archives
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 | |
/** | |
* Default Category Title in Genesis | |
* | |
* @author Marusca Gabriel | |
*/ | |
function mg_default_category_title( $headline, $term ) { | |
if( ( is_category() || is_tag() || is_tax() ) && empty( $headline ) ) | |
$headline = $term->name; | |
return $headline; | |
} | |
add_filter( 'genesis_term_meta_headline', 'mg_default_category_title', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment