Support » Plugin: WP User Manager - User Profile Builder & Membership » Hide wp-admin from regular users

  • Resolved agladkov

    (@agladkov)


    Hello guys,

    I need help with these issues:
    1) How could I avoid displaying wp-admin pages for all users except admins? Maybe there is a way I could throw 403 error?
    2) How could I redirect the user from the login page to another in case if he’s already logged in? I try to use sth like that in my header.php but looks like it doesn’t work.

    
    if ( !strpos( $_SERVER['REQUEST_URI'], '/login') && is_user_logged_in() ) {
        header("Location: /dash");
    }

    Thank you!

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