Skip to:
Content
Pages
Categories
Search
Top
Bottom

Stop users accessing /wp-admin

Viewing 3 replies - 1 through 3 (of 3 total)
  • @imath

    Moderator

    Hello,

    You can try to add this in the functions.php of your active theme :

    function henry_restrict_access_admin_panel(){
    global $current_user;
    get_currentuserinfo();
    if ( $current_user->user_level <  1 ) {
    
    $redirect = bp_core_get_user_domain( $current_user->ID );
    
    wp_redirect( $redirect );
    exit;
    }
    }
    add_action('admin_init', 'henry_restrict_access_admin_panel', 1);

    @hnla

    Participant

    ? hmmm was going to post a variation on the above code but bp.org refuses it *shrug*

    @shanebp

    Moderator

    You already said that – aka – Stop hitting yourself

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Stop users accessing /wp-admin’ is closed to new replies.
Skip to toolbar