Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active August 29, 2015 14:03
Show Gist options
  • Save billerickson/1f1798f79f7b29ac3093 to your computer and use it in GitHub Desktop.
Save billerickson/1f1798f79f7b29ac3093 to your computer and use it in GitHub Desktop.
<?php
/**
* Default Category Title
*
* @author Bill Erickson
* @url http://www.billerickson.net/default-category-and-tag-titles
*
* @param string $headline
* @param object $term
* @return string $headline
*/
function be_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', 'be_default_category_title', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment