Created
January 5, 2021 03:39
-
-
Save getmanzooronline/ac5ca3cec72b02f1feb40dd73530e329 to your computer and use it in GitHub Desktop.
Redirect default WordPress Registration and Login pages.
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
// Redirect Registration / Login Page | |
function pro_registration_page_redirect() | |
{ | |
global $pagenow; | |
if ( ( strtolower($pagenow) == 'wp-login.php') && ( strtolower( $_GET['action']) == 'register' ) ) { | |
wp_redirect( home_url('/registration')); | |
} | |
if ( ( strtolower($pagenow) == 'wp-login.php') ) { | |
wp_redirect( home_url('/my-account')); | |
} | |
} | |
add_filter( 'init', 'pro_registration_page_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment