Documentation

Print This page

How To Redirect From wp-admin With Hide Login (Hook)

If you enable the Hide Login Add-On then /wp-admin redirects on 404 page by default. If you want to redirects the user to another spot (like login page with different login URL like “donaim.com/login” instead of “domain.com/wp-admin). The following filter will help you to redirect from wp-admin with Hide Login.

Simply, you need to add the following piece of code in your Child Theme’s file functions.php and update the file.

function loginpress_wp_admin_redirect_callback() {
return wp_login_url();
}
add_filter( 'loginpress_hidelogin_wp_admin_redirect', 'loginpress_wp_admin_redirect_callback' );

That’s how you can redirect a user from wp-admin to other login page by using the above filter. Check our detailed guide on how to prevent the new user from send password in email with LoginPress.