Home>Support>Remove or Change Widget Styles for Specific Widgets

Remove or Change Widget Styles for Specific Widgets

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].

I want to remove or change the right hand “Widget Styles” column on a specific widget. I know it can be targetted by using:
add_filter( ‘siteorigin_panels_widget_style_fields’, ‘__return_false’, 11 );

But this removes the style column for all widgets not just one.

Any help will be appreciated.

Rob

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

  1. 9 years, 5 months ago Greg Priday
    Hi, I Work Here

    Hi Rob

    That’s a good point. At the moment there isn’t a way for a widget to remove its own style fields. There should be a way though. I’ve logged this as an issue on Github. You can keep track of it there.

    https://github.com/siteorigin/siteorigin-panels/issues/159

  2. 9 years, 5 months ago phr0sty

    Many Thanks Greg, in fact I think I may have seen you post this when I was searching.

    If each widget form had a class you would be able to target each list item or the whole list and set display:none; without having to create hooks etc.

    A work around would be to edit those options from the plugin but I can’t seem to work out the filter hook.

    In default-styles.php there is this filter hook:

    add_filter('siteorigin_panels_widget_style_attributes', array('SiteOrigin_Panels_Default_Styling', 'widget_style_attributes' ), 10, 2);

    For this function:

    function widget_style_attributes( $attributes, $args ) {

    I want to change:

    $args['background']

    Is there any way to do this? Set the style attributes from the widget?

    Thanks again

    Rob

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More