Skip to:
Content
Pages
Categories
Search
Top
Bottom

Denied ‘Participant’ User Role to Dashboard


  • glfoster
    Participant

    @glfoster

    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

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    I think this should work

    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);
    }
    }

    put in your functions file or use the code snippets plugin

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar