Skip to content

Instantly share code, notes, and snippets.

@kfriend
Created August 8, 2013 13:56
Show Gist options
  • Save kfriend/6184801 to your computer and use it in GitHub Desktop.
Save kfriend/6184801 to your computer and use it in GitHub Desktop.
Wordpress: Remove Admin Toolbar For Non-Admins
add_action('after_setup_theme', function() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment