Show admin bar only for some USERS roles
I have 4 users roles on my wordpress platform (role1, role2, role3, role4)
I'm looking for to show front-end top bar only for Role1 Role2.
how can i add a condition on this code to show it only for this 2 roles?
function wpc_show_admin_bar() {
return true;
}
add_filter('show_admin_bar' , 'wpc_show_admin_bar');
thanks
Topic admin-bar user-roles users Wordpress
Category Web