As the internet evolves, so does the information you need from customers when they register with your store. It’s likely that a default registration form will cover everything you want to gather when some signs up. For example, having social media usernames can help you keep in touch, but those fields are not automatically part of the default form.
It’s also important that you be able to add the same information if you manually create a user within the dashboard itself. Adding and modifying a bit of code in your theme’s function.php file will allow you to do both.
Let’s break down this code a bit.
Lines 1 to 50, adds the two new fields to the taxonomy in the Product Vendors form. This allows you to specify their Facebook or Twitter URLs as to manually create or edit a vendor in the WP-Admin.
Lines 51 to 76, validates and saves the fields in the database.
Lines 78 to 91, adds the same fields to the registration form. You can show this on a page by using the shortcode:
The fields will appear after the Vendor Description fields. These are shown at the end of the form right before the Submit button.
Lastly, lines 93 to 98 saved the fields in the vendor taxonomy.
Of course this is a simple example with two text fields. You could easily add any kind of fields you want, even more than 2.
This is just a simple example with two text fields, as you can imagine you can add any kind of fields, and as many as you want.