WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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. – toscho May 12 '12 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? – Ünsal Korkmaz May 12 '12 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. – toscho May 12 '12 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 – Ünsal Korkmaz May 12 '12 at 9:34
up vote 1 down vote accepted

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; }

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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