1
2
3
4
5
6
7
8
add_action( 'plugins_loaded', 'hide_adminbar' );
 
function hide_adminbar( ) {
 
	if( !current_user_can('manage_options') ){
		add_filter('show_admin_bar', '__return_false');
	}
}
Display admin bar only for administrators
Tagged on:

Leave a Reply

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