Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
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
You can’t perform that action at this time.