I am having problems finding an answer to this. I need to have a custom user meta field.
I can create them which is fine but I need to create a drop down one.
For example I want the user meta to be Unit type and the drop down values to be Residential and Commercial
Any help on this would be great. Thanks.
thanks for that. Just one minor tweak, as the first bit of code threw up an error. Below is the working code for the first block of code.
The second part is fine.
Once again if you know how to add a text field you know how to add any other form field, ex:
showing the fields:
Saving the fields
//hooks
in both cases you can see that i use the same function to store the data in the database and to get it from the database no matter what type of field it is.
Add it in your theme’s
function.php