--- title: How To Add Fields To WordPress Users Profile Page date: 2014-03-29 00:00:00 featured_image: https://images.unsplash.com/photo-1642629428981-fa0d8f2700af?q=90&fm=jpg&w=1000&fit=max excerpt: We discussed before wordpress users metadata and how it is flexible. Now we will explore how to use metadata in storing a per-user settings and how to add fields to user profile page to update metadata value. --- ![](https://images.unsplash.com/photo-1642629428981-fa0d8f2700af?q=90&fm=jpg&w=1000&fit=max) We discussed before wordpress users metadata and how it is flexible. Now we will explore how to use metadata in storing a per-user settings and how to add fields to user profile page to update metadata value. By default, wordpress trigger several actions to which you can hook to add content to profile page. - `personal_options`: Add content at end of personal options section in profile page. - `profile_personal_options`: Add content after personal options section in profile page. - `show_user_profile`: Add content before update button in profile page. Also wordpress trigger `personal_options_update` action hook on profile settings update to which you can hook to save user inputs in metadata value. Now let's create drop-down list that will appear in user profile page from which user can select his language. ```php function clivern_add_drop_down(){ //get user id $user_id = get_current_user_id(); //get user locale with user id $user_locale = get_user_meta($user_id,'clivern_user_local',true); if(!$user_locale){ //add default locale add_user_meta($user_id, 'clivern_user_local', 'en_US'); $user_locale = 'en_US'; } ?> Language Language