This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Remove or Change Widget Styles for Specific Widgets

10 years ago · Last reply by phr0sty 10 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Greg Priday Staff 10 years, 8 days ago

    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. phr0sty 10 years, 8 days ago

    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.

Have a different question or issue?

Start New Thread