Created
April 23, 2014 22:12
-
-
Save jaredatch/11234271 to your computer and use it in GitHub Desktop.
Default tax name
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 | |
/** | |
* Display default tax name on archives if no headline is provided | |
* | |
* @since 1.0.0 | |
* @param string $headline | |
* @param object $term | |
* @return string | |
*/ | |
function ja_tax_default_headline( $headline, $term ) { | |
if ( !is_tax( 'my-tax' ) || !empty( $headline ) ) | |
return $headline; | |
return $term->name; | |
} | |
add_filter( 'genesis_term_meta_headline', 'ja_tax_default_headline', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment