Skip to content

trepmal.com

  • Home
  • Plugins
  • Github
  • Me on WP.org
  • Donate

Categories

  • WordPress Bits (149)
  • Uncategorized (11)
  • Scripts (5)
  • Tidbits (5)
  • Fun (3)

Tags

  • wordpress (30)
  • administration (16)
  • plugin (9)
  • free download (8)
  • functions.php (8)

Year

  • 2018 (8)
  • 2016 (2)
  • 2015 (4)
  • 2014 (19)
  • 2013 (11)

Filter Hook: login_url

Redirect Users to a Custom Log In Page

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/';
}
Posted on April 7, 2011December 16, 2015Categories WordPress BitsTags log in, redirect2 Comments on Redirect Users to a Custom Log In Page
Proudly powered by WordPress