Getting URL Variables with a Rewritten Page (Login Page)
If you want instead of redirect to wp-login the user redirect to login page then use the following code. It will redirect user to login page where login form is present. add_filter(‘site_url’, ‘wplogin_filter’, 10, 3); function wplogin_filter( $url, $path, $orig_scheme ){ $old = array( “/(wp-login\.php)/”); $new = array( “login/”); return preg_replace( $old, $new, $url, 1); … Read more