Denied ‘Participant’ User Role to Dashboard
-
Hello,
I’m looking for a way to denied the ‘Participant’ user role the access to the dashboard /wp-admin
I’ve looked all over google and I haven’t found a complete solution. Can someone help me by pointing me into the right direction.
I’ve used user role plugins and they aren’t registering the user roles.
Thank you in advance
add_action(‘after_setup_theme’, ‘remove_admin_bar’);
function remove_admin_bar() {
$user_id = get_current_user_id() ;
$role -= bbp_get_user_display_role($user_id) ;
if (role == ‘bbp_participant’ {
show_admin_bar(false);
}
}
BEST ANSWER
- You must be logged in to reply to this topic.