Redirect already logged in users away from a page to a specific page base on user role
You can use admin_init to get this done. This hook fires when an admin page is starting to load and you can use it to redirect the user to a different page. Like this: add_action(‘admin_init’,’wpse362882_redirect_login_page’); function wpse362882_redirect_login_page () { global $pagenow; if ( ($pagenow == ‘wp-login.php’) && is_user_logged_in() ) { .. do some stuff to … Read more