Hi
I asked about this questions earlier. How to stop navigating to default wp login page when wrong username or password given and to give error message on the same page like ajax.
http://frcemexam.com/dwqa-questions/
Im using easywp namecheap hosting so ftp logins will work only for 12 hrs when generated.
Code you send before was not working to stop directing
I have checked on our demo site and the code works fine. In this case, you can try the following code:
add_action( 'wp_login_failed', 'custom_login_failed' );
function custom_login_failed( $username )
{
$referrer = wp_get_referer();
if ( $referrer && ! strstr($referrer, 'wp-login') && ! strstr($referrer,'wp-admin') )
{
wp_redirect( add_query_arg('login', 'failed', $referrer) );
exit;
}
}
If you still face their issue, you can send me the username & password of your site for further checking.
Any more infos?
If you have the same issue, you can use the code in the previous answer, you can send me your username & password of your site and FTP account for further checking if the code is not working.
Please login or Register to submit your answer