How to change register link in WordPress

So you have created a fancy and customized registration form on a page for smooth registration and now want to change the default register link on wp-login.php ?

Default WordPress Register Link

If yes then continue reading 🙂

To change/replace the default registration link with your own custom registration page link, add following code in functions.php file of your child theme or use it as mu-plugin.

https://gist.github.com/sjaved87/c12a98fdc767f37d1be83e83e8d80328

If you take the mu-plugin route, you’ll want to log into your site via FTP, and go to your /wp-content/ folder via FTP, finding the folder called “mu-plugins”.

If there’s no folder with that name, then you’ll want to create one. Then, create a file inside that folder, and give the file any name you like (making sure the file has an extension of .php, e.g. example.php) and paste the code in there.

It’ll always be active, so there’s no need to activate the plugin after creation. Be sure to add a PHP start tag at the beginning of the code, like this:

https://gist.github.com/sjaved87/b9038c629c065304886b230ce3a0997f

Now, you need to modify the code to make it work according to your requirements. I will break the code into parts and explain.

https://gist.github.com/sjaved87/c83020e61ccb3a7d0fadd4dd73813b2c

This is required and most important part of the above code. Make sure you replace the placeholder Register_URL with custom registration URL. Where you have created your custom registration form.

https://gist.github.com/sjaved87/ca143d1e5c6952fec14d500e4d504a65

This is optional but can play important role to attract your visitors click and go to registration page (make it call to action). Simply replace the text Register with your own text e.g. Signup or any other word you think can help convert.

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Inline
Inline