Home>Support>Function to add Widget class to it’s parent

Function to add Widget class to it’s parent

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

For styling reasons I need the Widget class entered under the Attributes tab of a widget also in the parent div (The div with class .so-panel).

I know you can add the Row class to it’s parent with the following function:

function panels_row_classes( $classes, $grid ) {
	$classes[] = $grid["style"]["class"];
	return $classes;
}
add_filter( 'siteorigin_panels_row_classes', 'panels_row_classes', 10, 2 );

Now I also need something simular for the Widget class, but my knowledge of Filters and Hooks are limited.

Any help is appreciated!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More