Created
September 9, 2015 19:25
-
-
Save davechu/db6f309519ee91619f10 to your computer and use it in GitHub Desktop.
The idea is to use the genesis_attr_{some-class-or-html-tag} format. Your class (or HTML tag) must only occur once on the page for it to work. Notice that I concatenate the class so that existing classes don't get lost.
This file contains hidden or 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_site-inner', 'dc_modify_site_inner_attr' ); | |
function dc_modify_site_inner_attr( $attributes ) { | |
$attributes['itemtype'] = 'http://schema.org/Report'; | |
$attributes['class'] .= ' myNewClass'; | |
return $attributes; | |
} | |
add_filter( 'genesis_attr_head', 'dc_modify_head_attr' ); | |
function dc_modify_head_attr( $attributes ) { | |
$attributes['itemtype'] = 'http://schema.org/Report'; | |
$attributes['class'] .= ' myNewClass'; | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment