Print This page

Redirect from wp-admin with Hide Login (Hook)

If you enable Hide Login Add-On, /wp-admin redirects on 404 by default. If you want to redirects the user to another spot (like login page). The following filter will help you achieve the task

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

Here you can return a user anywhere you want.