Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya
Created July 2, 2014 17:42
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 hellofromtonya/aace59d40c81d5865ae2 to your computer and use it in GitHub Desktop.
Save hellofromtonya/aace59d40c81d5865ae2 to your computer and use it in GitHub Desktop.
Add custom class to Genesis .entry-header
add_filter('genesis_attr_entry-header', 'lunarwp_attributes_entry_header');
/**
* Add attributes for header entry-header element.
*
* @since 1.0.0
*
* @param array $attributes Existing attributes.
* @return array Amended attributes.
*/
function lunarwp_attributes_entry_header($attributes)
{
if (is_page() && ! is_home() && ! is_front_page())
{
$attributes['class'] .= ' lunarwp-entry-header';
}
return $attributes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment