I want to remove some plugin widget showing from wp-admin/widgets.php but i dont want to use unregister_widget because i am using this widget automatically from php files..

Basically i dont want clients see this widget as option in wp-admin/widgets.php but i want to use this widget from php files. I thought css display:none as solution but widget div IDs are not static seems

Any idea?

  • Why do you want to call the code as a widget if you're not using the widget functionality? Why can't you just call the code without extending the widget class? Please update your question.
    – fuxia
    May 12, 2012 at 6:20
  • uhm.. probably i dont know the way to do that.. basically widget is from this plugin: wordpress.org/extend/plugins/query-multiple-taxonomies can you check it if its possible to use it from function properly? May 12, 2012 at 9:25
  • That's a little bit too much code for a quick look. :) What do you want to achieve? If you need just one special output there is probably a simpler way.
    – fuxia
    May 12, 2012 at 9:31
  • this plugin creates widgets which i need but i am using those in functions.php without using widget panel. And i dont want my clients see this widget in their widget panel but if i disable it with unregister_widget, then widgets not working even from functions.php May 12, 2012 at 9:34

1 Answer 1


Check the following answer, adapt the code and it will do what you want.

Use Firebug for Firefox, or Chrome/Safari inspector to discover the widget ID.

Note the use of CSS3 attribute selector, that allows targeting an element using a partial ID or Class.
For example, this will hide the Calendar widget:
div.widget[id*=_calendar-] { display:none; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.