Admin bar is the dark bar with buttons to add content, and manage updates, comments. For regular users, this bar sometimes becomes confusing. To easily hide admin bar, add the following snippet to your functions.php file:

function remove_admin_bar() {
  if (!current_user_can('administrator') && !is_admin()) {
    show_admin_bar(false);
  }
} add_action('after_setup_theme', 'remove_admin_bar');

Comments (0)

Leave a Reply

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