Tag Archives: customize

Remove WordPress 3.1 Admin Bar

When setting up wordpress sites for our clients, we don’t always want them to have access to certain areas of the back-end, such as the widgets. Allowing inexperienced users widget access can destroy all of our hard work. With the help of various plugins we can limit “editor” level access to our admin area!

This was a perfect solution until WordPress v.3.1!

One of the cool new features (for some) of WordPress v3.1 is the addition of the front end admin bar.

When you are the only Administrator for your site, this makes editing the site a little easier. (I still prefer to get right in the back end).

Although this bar can be toggled on and off via your “user profile” page as seen below…

This only works on a per user basis!

So now you’re wondering how to…

Turn off the admin bar for anyone who is not a site admin!

Simply add the following code you your functions.php file

//remove wp admin bar for everyone except ADMIN
function theR3AP3R_function_admin_bar($content) {
return ( current_user_can("administrator") ) ? $content : false;
}
add_filter( 'show_admin_bar' , 'theR3AP3R_function_admin_bar');
;

This will allow only the site admins to see the admin bar on the site!

Enjoy!