Hiding specific widgets
-
In case this is useful to others, I have some widgets that I don’t want made available to the site admin. They’re widgets created by specific plugins and somewhat “immune” to being deregistered. I have them removed from the admin widgets page but removing them from Panels needed some plugin edits.
In the file: siteorigin-panels/tpl/metabox-panels.php
Line 36 find:
<li class=”panel-type”
and change to:
<li class=”panel-type” id=”<?php echo esc_attr($class) ?>”Then above <ul class=”panel-type-list”> add style rules to hide those id’s
<style type=”text/css”>
#one_type_widget,
#another_type_widget,
#yet_another_type {
display: none !important;
}
</style>Whichever widget id’s you want to hide add them to the style rule. Normally I don’t like editing the plugins because of updates but sometimes it’s needed. I always write my edits in a text file so when I update the plugin I re-add the edits accordingly.
The topic ‘Hiding specific widgets’ is closed to new replies.