redirect login page if user is already logged in | Peter's Login Redirect | Forum
Back to the login redirect plugin page
3:50 am
Hi, I don't know if your plugin is designed to handle this scenario, but what I need to do is redirect the wordpress login page (site.com/wp-admin) to another page if the user is already logged in. I am trying to avoid logged-in users from landing into the admin area which is confusing for them. I have my homepage redirecting to the login page, which is why this is a likely scenario. Any advice on how to accomplish this redirect?
Hi, since there's no login process for that scenario, my plugin wouldn't help out of the box, although you could look at re-using some of the code separately. Perhaps you could look into some sort of generic hook in the admin interface and then inject some code that checks the user's role and/or capabilities there. Good luck!