Created
July 2, 2014 17:42
-
-
Save hellofromtonya/aace59d40c81d5865ae2 to your computer and use it in GitHub Desktop.
Add custom class to Genesis .entry-header
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
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