add_action( ‘wp_login_failed’, ‘my_front_end_login_fail’ ); // hook para el accesso fallido
function my_front_end_login_fail( $username ) {
$referrer = $_SERVER[‘HTTP_REFERER’]; // ¿de donde viene?
// si hay una referencia válida, y no es la pantalla de acceso por defecto
if ( !empty($referrer) && !strstr($referrer,’wp-login’) && !strstr($referrer,’wp-admin’) ) {
wp_redirect( $referrer . ‘entrar’ ); // le añadimos algo de información (login-failed) a la URL del tema en uso
exit;
}
}
Entradas relacionadas
Publicación anterior
SNIPET ACTIVAR VERNTANA MODAL
Publicación siguiente
2 comentarios
Puroair home air filter
I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.
binance account
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me? https://accounts.binance.com/es-AR/register?ref=UT2YTZSU