Skip to content

Instantly share code, notes, and snippets.

@jaredatch
Created April 23, 2014 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredatch/11234271 to your computer and use it in GitHub Desktop.
Save jaredatch/11234271 to your computer and use it in GitHub Desktop.
Default tax name
<?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