This works
// hook failed login
add_action('wp_login_failed', 'my_front_end_login_fail');
function my_front_end_login_fail($username){
// Get the reffering page, where did the post submission come from?
$referrer = $_SERVER['HTTP_REFERER'];
// 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')){
// let's append some information (login=failed) to the URL for the theme to use
wp_redirect($referrer . '?login=failed');
exit;
}
}
http://www.wpinsite.com/code-snippets/how-to-redirect-wordpress-failed-logins
glad you solved you own issue.
Have even more code to also redirect them to a page if a users fills in nothing
add_action( 'wp_authenticate', '_catch_empty_user', 1, 2 );
function _catch_empty_user( $username, $pwd ) {
if ( empty( $username ) && empty( $pwd )) {
wp_redirect($referrer . 'http://yourdomain.nl/aanmelden');
exit();
}
}
add_action('wp_login_failed', 'my_front_end_login_fail');
function my_front_end_login_fail($username){
// Get the reffering page, where did the post submission come from?
$referrer = $_SERVER['HTTP_REFERER'];
// 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')){
// let's append some information (login=failed) to the URL for the theme to use
wp_redirect($referrer . 'http://yourdomain.nl/aanmelden');
exit;
}
}
Not my code this is all scattered from around the web
well thanks for finding the code , im sure this will help alot of users who run into the same issue.