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?

4 s
4

function mytheme_admin_bar_render() {
  global $wp_admin_bar;
  $wp_admin_bar->remove_menu('wp-logo');
}
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

if(current_user_can('editor')){
 add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
}

http://codex.wordpress.org/Roles_and_Capabilities

Leave a Reply

Your email address will not be published. Required fields are marked *