/>PHP

add_action( ‘wp_login_failed’, ‘my_front_end_login_fail’ );
function my_front_end_login_fail( $username ) {
$referrer = $_SERVER['HTTP_REFERER'];
if ( !empty($referrer) && !strstr($referrer,’wp-login’) && !strstr($referrer,’wp-admin’) ) {
wp_redirect( $referrer . ‘?login=failed’ );
exit;
}
}

/> /> /> Visit wpsnipp.com for details on how to setup this WordPress snippet. /> /> Share this post. Facebook | StumbleUpon | Delicious | Tweet It | Digg This | DesignBump-It | DesignPoke-it /> />

Tags: