Redirecting already logged-in users to wp-admin
-
First of all, thanks for creating this plugin π One thing that I would like to see in the plugin is feature that redirects already logged-in users to wp-admin when they go to custom login page.
Made for my theme short action to login_head that redirects user. Do you see any harm using this?
/* * Redirect login page loads to wp-admin if user is already logged in * */ add_action( 'login_head', 'redirect_to_admin',1); function redirect_to_admin(){ if(is_user_logged_in()){ wp_redirect(admin_url()); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Redirecting already logged-in users to wp-admin’ is closed to new replies.