I need help to show my own created user registration form. Whatever I do, WP 5.9 is always showing the default registration form.
I have used many different plugins to create a customer registration form and followed all steps described in the plugins. Whatever I do, WP always shows the default registration form. Is there a way/setting to replace the default form?
Thank you so much, Hump
I need help to show my own created user registration form. Whatever I do, WP 5.9 is always showing the default registration form.
I have used many different plugins to create a customer registration form and followed all steps described in the plugins. Whatever I do, WP always shows the default registration form. Is there a way/setting to replace the default form?
Thank you so much, Hump
Share Improve this question asked Feb 22, 2022 at 9:22 user219526user219526 1 1 |1 Answer
Reset to default 0Presuming you have your custom registration form set up to its own URL, such as /custom-register-page/
or something like it, then you can use the following code to change the register URL on the default WP login page:
add_filter( 'register_url', 'update_register_url' );
function update_register_url( $url ) {
if( is_admin() ) {
return $url;
}
return "/custom-register-page/";
}
Add this code to your template's functions.php
file, if that makes sense, or create a plugin to use this code. Make sure to update the code to use your custom register page URL.
wp-admin
/wp-includes
? Custom registration forms don't normally replace the original registration form, rather they add a new form elsewhere that you can direct users to. The same with custom logins. Some plugins then provide redirects to those who visit the original registration/login. Keep in mind this is a programming stack so any answer you get may require PHP knowledge to understand and use – Tom J Nowell ♦ Commented Feb 22, 2022 at 10:52