asked 5 years ago

I know this plugin  uses wordpress defult login. I dont want it to re direct to default login page when wrong password given.
Incorrect password on the same page. How to do it

1 Answers
answered 5 years ago

You can add the following code to the functions.php file.

function my_front_end_login_fail( $username ) {
   $referrer = $_SERVER['HTTP_REFERER'];  // where did the post submission come from?
   // if there's a valid referrer, and it's not the default log-in screen
   if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') ) {
      wp_redirect( $referrer . '?login=failed' );  // let's append some information (login=failed) to the URL for the theme to use
Powered by DW Question & Answer Pro