Show / hide Admin bar base on user roles


This article is outdated. Woffice has a new documentation here: 


If anything is missing, let us know and we will improve it. It was designed to be searchable, more organized and more complete. 


Please, add the following code in child theme's functions.php file.

function custom_remove_admin_bar() {
   if (current_user_can('subscriber')) {
   } else {
add_action( 'after_setup_theme', 'custom_remove_admin_bar', 30);

The above code show admin bar if the user has the "subscriber" role . You may change "subscriber" with any other capability to show bar for that capability :)