Home>Support>Remove some widgets from the available list

Remove some widgets from the available list

By Phil, 8 years ago. Last reply by Phil, 8 years ago.

Hi guys,

Is it possible to disable some of the widgets available in the options? Is there a filter which can be used for this? I can’t see any mention of this in the developer docs, but wanted to double check.

Thanks!

Phil

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

  1. 8 years, 2 months ago Alex S
    Hi, I Work Here

    Hi Phil,

    You sadly cannot disable widgets via the options but you can disable them via a filter – siteorigin_panels_widgets which will allow you to filter the widgets array. Here’s an example of the data you could expect to see in $widgets (which, again, is an array):

    'SiteOrigin_Widget_PostCarousel_Widget' => 
        array (size=6)
          'class' => string 'SiteOrigin_Widget_PostCarousel_Widget' (length=37)
          'title' => string 'SiteOrigin Post Carousel' (length=24)
          'description' => string 'Display your posts as a carousel.' (length=33)
          'installed' => boolean true
          'groups' => 
            array (size=1)
              0 => string 'so-widgets-bundle' (length=17)
          'icon' => string 'so-widget-icon so-widget-icon-postcarousel' (length=42)
      'WP_Widget_Pages' => 
        array (size=6)
          'class' => string 'WP_Widget_Pages' (length=15)
          'title' => string 'Pages' (length=5)
          'description' => string 'A list of your site’s Pages.' (length=34)
          'installed' => boolean true
          'groups' => 
            array (size=1)
              0 => string 'wordpress' (length=9)
          'icon' => string 'dashicons dashicons-wordpress' (length=29)
    

    Simply unset the widget, for example, WP_Widget_Pages and it’ll hide the widget.

  2. 8 years, 2 months ago Phil

    This is perfect, thanks dude!

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