Skip to content

Instantly share code, notes, and snippets.

@davechu
Last active September 9, 2015 16:35
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 davechu/0c22e642bcfe1d35d000 to your computer and use it in GitHub Desktop.
Save davechu/0c22e642bcfe1d35d000 to your computer and use it in GitHub Desktop.
For emmtre. In place of sidebar-primary, sidebar-secondary and footer-widgets should also work. Notice how I'm concatenating the class and leaving a space; if you just assign a value to it, you'll remove your other classes from the sidebar, and the visual results will be dramatic! :)
add_filter( 'genesis_attr_sidebar-primary', 'dc_modify_widget_area_attr' );
function dc_modify_widget_area_attr( $attributes ) {
$attributes['itemtype'] = 'http://schema.org/CreativeWork';
$attributes['class'] .= ' prettyproduct';
return $attributes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment