Created
October 9, 2014 12:29
-
-
Save JiveDig/adedc27cc2d9320ce6de to your computer and use it in GitHub Desktop.
Redirect login and registration form to front end page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Redirect wp-login.php to custom url | |
add_action( 'login_form_login', 'mwm_redirect_login' ); | |
function mwm_redirect_login() { | |
wp_redirect( home_url() ); | |
exit(); | |
} | |
// Redirect wp-login.php?action=register to custom url | |
add_action( 'login_form_register', 'mwm_redirect_register' ); | |
function mwm_redirect_register() { | |
wp_redirect( home_url('join') ); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment