You can alternatively hide it using show_admin_bar filter. Here I introduce my code.
function hide_admin_bar_subscribers( $show ) {
if ( current_user_can( ‘subscriber’ ) ) {
return false;
}
return $show;
}
add_filter( ‘show_admin_bar’, ‘hide_admin_bar_subscribers’ );
-
This reply was modified 4 years, 10 months ago by Yin Jin.