How to upload image with simple form?
There are several parts. You need to add an enctype to the profile form. function edit_form_type_wpse_98375() { echo ‘ enctype=”multipart/form-data”‘; } add_action(‘user_edit_form_tag’,’edit_form_type_wpse_98375′); Then add a field to the form. function user_fields_wpse_98375($profileuser) { $_profile_photo = get_user_meta($profileuser->data->ID,’_profile_photo’,true); echo ‘<h3>’.__(‘Additional User Data’,THEME_TEXTDOMAIN).'</h3>’; echo ‘<tr class=”show-admin-bar”>’; echo ‘<th scope=”row”>’.__(‘Profile Photo’, THEME_TEXTDOMAIN).'</th>’; echo ‘<td’.$tspan.’>’; echo ‘<fieldset>’; echo ‘<legend class=”screen-reader-text”><span>’.__(‘Profile Photo’, … Read more