Can I add an extra field on WordPress Registration?
I got many e-mails from my clients and my users that how they can add an extra field to their default WordPress Registration form. Always my answer was YES. For me, WordPress is the most powerful user management system because it allows you to extend what it has 🙂
By depending on the extending facility of WordPress, I have added the extra field on the registration form. As all of the WordPress users does not have code knowledge for that reason, my blog always shows how to do few tricky and easy development without having much technical knowledge.
How to Add?
Nowadays I get much time to help my users and the perk of that I am writing this to all of the users who does not know how to add an extra field!
At first please install a child theme on your website because child theme is easier and safe to extend the functionality of WordPress.
This custom development has two parts. On the first part, I will show How to show the field on the registration form and then I will work to save those fields data in the user profile area. I have done a sample for you and you can use these codes on your website –
If you can check the code comment (/comment/) then you will see that on the first section I have added the filter and insert the registration field for the form. Also, It is showing correctly on the registration form.
Now, you have to save the field data on your user profile. To save the field I have used these filters- pre_user_first_name and pre_user_first_name. After updating those field, your user can easily insert his data on the form and admin/you will be able to see them in the user profile edit area.
This is how you can add some fields on the registration form without installing a plugin.
Thank you for reading till the end 🙂