Created
November 3, 2023 13:50
-
-
Save larbous/387ffcc2fef4a4ed376c43ca4de89413 to your computer and use it in GitHub Desktop.
Redirect User Registration to Custom Registration 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 Registration Page | |
function my_registration_page_redirect() | |
{ | |
global $pagenow; | |
if ( ( strtolower($pagenow) == 'wp-login.php') && ( strtolower( $_GET['action']) == 'register' ) ) { | |
wp_redirect( home_url('/registration-url')); | |
} | |
} | |
add_filter( 'init', 'my_registration_page_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment