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

Is there anyway to remove the 'W' icon from the WordPress toolbar located at the top, when Authors login?

I know that an author can uncheck an option for an individual user, but we need to do this for all users?

share|improve this question
up vote 5 down vote accepted
function mytheme_admin_bar_render() {
  global $wp_admin_bar;
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

For specific user roles you can wrap the add_action in a conditional, something like

 add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );


share|improve this answer
Sorry, noob question but where do I add this? – AshesToAshes Apr 2 '12 at 17:07
add this to your theme's functions.php, or make a plugin with it so it can work on any theme. – Wyck Apr 2 '12 at 17:10
Excellent thats worked fabulously! :) – AshesToAshes Apr 2 '12 at 17:12

To just remove the logo from the toolbar, add this to your stylesheet:

#wp-admin-bar-wp-logo { display:none; }
share|improve this answer
ohh excellent ... would I edit the Style.css from the Twenty Eleven theme? – AshesToAshes Apr 2 '12 at 17:05

you can use jQuery

$('#wp-admin-bar-wp-logo').remove(); //this will remove only WP logo

Also this will remove the whole top menu bar for everyone but the admin (user 1). This will update the user meta to hide the menubar. The user will still be able to select to show or hide this but will be reset to hide. You can also hide this option from the use with jQuery.

Place this in the functions.php file

if (!current_user_can('administrator') || get_current_user_id() != 1)
    $user_id = get_current_user_id();
    update_user_meta( $user_id, 'show_admin_bar_front', false );
    update_user_meta( $user_id, 'show_admin_bar_admin', false );
share|improve this answer
is there anyway to keep it there but just have the 'New' button? – AshesToAshes Apr 2 '12 at 17:14
I think @Wyck has the best answer. – Nick Apr 2 '12 at 17:16
Add additional $wp_admin_bar->remove_menu('whatever'); . Replace whatever with the end of the id of the element you want to remove. example - remove comment wp-admin-bar-comments is the id of the element to remove. Replace whatever with just comments. Remove the wp-admin-bar-. – Nick Apr 2 '12 at 17:24
Thanks Nick! Excellent! – AshesToAshes Apr 2 '12 at 17:26

Also you can use plugin Toolbar menu. You can:

  • Use custom menu to show in Toolbar
  • Deactivate default WordPress Toolbar sections
  • Show Toolbar to guest users
  • Show login box in Toolbar for guest users
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.