Sometimes, We are required to add additional class into a specific element container to add some additional features and customizations.
One can add multiple classes into different HTML markup and container via Genesis filters.
Open functions.php and add the following
//* Add extra class to content function designody_add_class( $attributes ) { $attributes['class'] = $attributes['class']. ' your-extra-class'; return $attributes; } add_filter( 'genesis_attr_content', 'designody_add_class' );
and change
- your-extra-class to name of the class.
- genesis_attr_content with other attr value
Genesis offers “Attributes” via filters to add additional customization to a specific container and we can find all in Genesis Attributes post.