Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Remove Wordpress admin bar from users and site

Hello all!

I have a quick question that I think would benefit everyone using wordpress.

How do you remove the Wordpress admin bar so that only you, the admin, can see it but other site members or users and visitors cannot see it?

Thanks in advanced

2 Answers

Sue Dough
Sue Dough
35,800 Points

You can not turn off the admin bar for all users in the WordPress dashboard. You can use something like this though.

add_filter('show_admin_bar', '__return_false');

Source - https://codex.wordpress.org/Function_Reference/show_admin_bar

Jeff Lemay
Jeff Lemay
14,268 Points

You, the admin, are the only one who can see it. And only when you are logged in. Try viewing your site in a different browser or in an incognito/private window.

Hey Jeff! Thanks for your reply.

I tried out 2 other browsers besides chrome and the bar still appears with the wordpress logo Log in Register and a search bar.

Using Wordpress 4.2.1.

Jeff Lemay
Jeff Lemay
14,268 Points

Oh, I gotcha. I'd imagine there is a setting in your theme to disable those links (I don't think you'd have to edit the php files directly to remove those links, but every theme is different).

Ok Ill try to look in the theme's options and see what I can find. Thanks Jeff!