Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
So, i managed to achieve what i want by directing the exisiting window.location.href to a newly created php file i put in the root called .login.php. I will share the code below as it handles the user roles nicely when logging in using this jquery method .login.php <?php require_once(‘wp-load.php’); function user_role_check_modal( $role, $user_id = null … Read more