Relevant for WordPress 4.4: https://core.trac.wordpress.org/ticket/35103
If you’ve created a login page that isn’t at /wp-login.php
, here’s a simple way you can redirect users who click on the “Log In” links to your new page:
add_filter( 'login_url', 'new_login_url', 10, 2 ); function new_login_url( $login_url, $redirect ) { return '/log-in/'; }
Thanks for the simple solution – it looks like this strips the $redirect from the URL though – any way to pass that along undisturbed?
thanks