Hi,
The new generate_do_element_classes() has been added in GP 2.2. I never used the previous functions this replaces so I don’t know where to start looking for them to see how I might use the new one.
What I’m trying to do is add an additional CSS class to the main element in WooCommerce shop pages (it’s for FacetWP). In Genesis, I would use this:
add_filter( 'genesis_attr_content', 'zw3_main_content_add_class' );
function zw3_main_content_add_class( $attributes ) {
// add original plus extra CSS classes
if( is_shop() ) {
$attributes['class'] .= ' facetwp-template';
}
// return the attributes
return $attributes;
}
This is a specific filter to target the specific element but you get the idea. How can I achieve the same in GP with generate_do_element_classes?
Thanks!