Hide wp-admin from regular users
-
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)
The topic ‘Hide wp-admin from regular users’ is closed to new replies.