wp_usermeta – Read from database, but save function broken
You have not provided the whole code so don’t understand where you are wrong, this script is working fine for me. add_action( ‘personal_options_update’, ‘save_extra_profile_fields’ ); add_action( ‘edit_user_profile_update’, ‘save_extra_profile_fields’ ); function save_extra_profile_fields( $user_id ) { if ( current_user_can(‘edit_user’,$user_id) ) update_user_meta($user_id, ‘uidnumber’, sanitize_text_field($_POST[‘uidnumber’])); } add_action(‘show_user_profile’, ‘show_extra_profile_fields’); add_action(‘edit_user_profile’, ‘show_extra_profile_fields’); function show_extra_profile_fields( $user ) { ?> <p class=”form-row form-row-wide”> … Read more