You have to trigger the following hooks:
- user_register
- personal_options_update
-
add_action('user_register', 'addMyCustomMeta'); add_action('personal_options_update', 'addMyCustomMeta' ); add_action('edit_user_profile_update','addMyCustomMeta' ); function addMyCustomMeta( $user_id ) { update_user_meta( $user_id, 'user_phone', $_POST['user_phone'] ); }
Hope that helps!!
Related Posts:
- How to add fields in custom registration form, validate it and aave to db? [closed]
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Custom registration form and custom field
- Can I count the number of users matching a value in a multiple value key?
- How to get users by a custom field / by user meta data?
- How do you add a custom option to user data?
- Show User Their Password
- generate unique number when registering a user
- How to update serialized data in the user meta data
- Register new user and add custom data row value for it
- How to reload the role specific registration form on validation errors?
- How can I sort get_users() by any value (last_name, user defined fields and more)
- Upload files programmatically to users
- Displaying additional User Contact Information
- get_user_meta Short Profile Section
- Login & Register & Custom details WITHOUT plugin
- Registration and Profile custom field
- Separate table or usermeta
- meta_query for a string inside a meta field containing a comma-separated list
- How to update custom user meta field in wp?
- Add More Fields to Users Pages (Admin Panel)
- WordPress User Profile Upload – If page is saved file reset
- ACF: How to get the full field name (meta_key) by a field key?
- How do I create a column in Users list and display user data from custom registration field
- How to save multiple options from a dropdown in user profile
- WP_User_Query pulling ACF to loop
- Users Select inside custom metabox
- query usermeta from custom field
- custom avatar removal
- Excluding Specific Fields from Profile Builder Registration Form
- How to add upload video option in wordpress for user?
- Passing args to WP_User_Query am I using meta correctly?
- How to save the date/time of last update of an extra user profile field?
- Show image if author meta (profile fields) exists outside loop
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- check for duplicate user meta data before updating
- Custom Field Repeating When Using foreach
- Increment user meta data by 1 each time a page is visited
- Front end register with custom fields
- Front-End User Profile
- Get emails from users by custom field SQL
- award points to a user each time they update their cpt post
- How to update user profile custom fields
- Adding extra fields to front end signup form
- Save custom field types with this function…?
- Adding re-type email and check it if the email match
- Display Additional Info
- Populate custom checkout fields with data from previous orders
- Add WordPress user custom meta to chartjs vertically stacked chart in Divi theme
- User query – getting values for custom meta keys/fields
- Delete user meta but only if found in array
- How to get data from user meta custom fields created with acf-pro plugin?
- How to save multiple values with same meta_key, each value linked to another tag id
- Custom User Dashboard
- Custom user registration fields in user_register hook
- author.php not showing content if Author has no Posts
- Adding more fields to the registration form
- Getting user’s data, by custom field lookup (meta)
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- register_form, custom field not submitted on first try
- Redirecting to an external URL
- update_user_meta(): invisible data storage
- Extend WP_User_Query or WP_User to return all custom fields?
- Populate a select box with data stored in the database?
- Register author, facebook connect, publish posts from front end
- Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page
- Is it possible in WordPress
- wordpress simple post multi rating with post_meta and user_meta
- How do i get a specific user metadata using custom metavalue outside of wordpress?
- Echo text if field under user_meta is empty with get_users()
- how to add radio field on user meta on function.php?
- file upload user profile
- Can’t sort custom column on user.php by number / meta_value_num?
- Create Unique and Customized User ID for Website Members in WordPress
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- WP_Query – Order results by meta value
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- getting all values for a custom field key (cross-post)
- How to add a custom field in the advanced menu properties?
- Custom query with orderby meta_value of custom field
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Using meta query (‘meta_query’) with a search query (‘s’)
- Can I exclude a post by meta key using pre_get_posts function?
- Add validation and error handling when saving custom fields?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Show Custom Fields in Quick Edit
- Where are custom field values stored in the database
- Validating Custom Meta Box Values & Required Fields
- Max length of meta_value
- Adding fields to the “Add New User” screen in the dashboard
- Add custom fields to wp native gallery settings
- How to fix missing custom fields after upgrading to WordPress 4.8.1?
- How to enable custom fields for pages (if not a bad practice)?
- How can I add extra attribute in the ‘Page Attribute’ section in wp-admin for pages?
- Is there a way to set default custom fields when creating a post?
- Custom post meta field effect on the performance on the post
- How to get custom post meta using REST API
- Custom field/meta populated by dropdown of existing posts?
- Difference between meta keys with _ and without _ [duplicate]
- Is there any action filter/hook for validating a custom field before publishing the post?