What way would you recommend adding some new meta data in this fashion? Here you’re just updating the meta, but what if you wanted some new fields to be added to the user profile?
Thanks, (very useful as well) but I don’t have any issues adding the fields to the profile page.
What I meant is within the initial user registration form above. I suppose the best way is to just use add_user_meta within the “insert_register_fields” method. 🙂
I was looking for this example all over the place. Great job man! Why doesn’t WP have this in their Codex? Makes no sense…
What way would you recommend adding some new meta data in this fashion? Here you’re just updating the meta, but what if you wanted some new fields to be added to the user profile?
This post shows how to add additional fields to the profile page.
Thanks, (very useful as well) but I don’t have any issues adding the fields to the profile page.
What I meant is within the initial user registration form above. I suppose the best way is to just use add_user_meta within the “insert_register_fields” method. 🙂
You can use
add_
as well. I tend to useupdate_
since it will add the key/value pair if the key does not already exist.Ah yes, that’s right. Thanks for that reminder 🙂
I try this code on a website on worpress multisite, it’s ok but the validate field function on the hook ‘register_post’ don’t works.
have you an idea?