Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to disable the admin bar search field when certain users, belonging to specific roles are logged in. I would like to keep the search field available for the role 'admin', but not others.

This post tells me how to remove the admin bar completely, but doesn't give any info regarding how to selectively remove elements of it.

Does anyone have experience with this?

Thanks, jml

share|improve this question
What have you tried so far? –  kaiser Jan 20 '14 at 21:57
@kaiser - I don't know where to start. Anything helps. I was able to disable the search field for the front-facing site via style.css and header.php in my child theme, but that is only for the outside. –  jml Jan 20 '14 at 22:04
Maybe start by showing us that you're able to run any code in the admin UI or what your search for the admin toolbar and the search field returned. –  kaiser Jan 20 '14 at 22:08
Uhm... I searched this site and the WP support site, to no avail. I haven't found any information on doing this. It could be that it's a yes or no question to "is it possible", but I have no experience with it. Here's the only stackexchange query that is even remotely related: wordpress.stackexchange.com/questions/54235/… ...Also, not sure what you mean by "show us that you're able to run any code in the admin UI" - that seems to be a bit off topic. –  jml Jan 21 '14 at 0:55
Please file edits for additional info (instead of comments). For your reasearch: Try "adminbar". –  kaiser Jan 21 '14 at 1:25

Your Answer


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

Browse other questions tagged or ask your own question.