Created
March 15, 2015 18:21
-
-
Save SiGaCode/8cb8fb918f259eb65a45 to your computer and use it in GitHub Desktop.
Custom body attributes (change filter to apply to any other element)
Credits: http://wpbeaches.com/adding-attribute-html-section-genesis/
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_body', 'custom_add_css_attr' ); | |
function custom_add_css_attr( $attributes ) { | |
// add original plus extra CSS classes | |
$attributes['class'] .= ' parallax'; | |
$attributes['data-diff'] = '100'; | |
// return the attributes | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment