Disable the WordPress admin bar for certain user roles.
<?php
function ccd_hide_admin_bar() {
// Choose your user role
if ( ! current_user_can( 'edit_posts' ) ) {
show_admin_bar(false);
}
}
add_action( 'set_current_user', 'ccd_hide_admin_bar' );
?>
WordPress Snippet