The website cannot display the page
I fixed it!!! Woohoo. Using this link – link to patch I edited the line it advises and it works fine.
I fixed it!!! Woohoo. Using this link – link to patch I edited the line it advises and it works fine.
Here is a simple solution. Im hooking into login_headerurl. Maybe there is a better hook for this but it works, Put this in your functions.php: function wpse_lost_password_redirect() { // Check if have submitted $confirm = ( isset($_GET[‘checkemail’] ) ? $_GET[‘checkemail’] : ” ); if( $confirm ) { wp_redirect( home_url() ); exit; } } add_action(‘login_headerurl’, ‘wpse_lost_password_redirect’); … Read more
After finding this question, and testing a few of the answers, the below is a “cleaned up” version of what I am using in a production environment. This version does not throw any notices / errors, and also allows for password resets to work: // Hook the appropriate WordPress action add_action(‘init’, ‘prevent_wp_login’); function prevent_wp_login() { … Read more
Had the same problem… clearing the cookies didn’t do the trick. What did the trick was logging in via incognito mode first, and then I was able to login normally.
wp_login_form() creates a form with an action attribute of site_url/wp-login.php, which means that when you click the submit button the form is posted to site_url/wp-login.php which ignores redirect_to on errors (like wrong password) so in your case either go back to using a plugin or recreate the whole login process and that way you will … Read more