1add_action('after_setup_theme', 'remove_admin_bar');
2
3function remove_admin_bar() {
4if (!current_user_can('administrator') && !is_admin()) {
5 show_admin_bar(false);
6}
7}
8
1/* Disable WordPress Admin Bar for all users */
2add_filter( 'show_admin_bar', '__return_false' );
3