Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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