A common issue with these “front-end” profiles is that they need enctype="multipart/form-data"
added to the form code. Which plugin are you using?
Hi Bangbay, I don’t use a plugin – just some standard code that pulls from the backend and writes to it (easier for me to edit and change than a plugin). I’ve had big issues with avatar upload though, and your plugin works great. Adding the multipart also fixed it. Thanks – you’re amazing! I do have another question for the time being, though. Would I be able to move the form to a different part of the form? As it sits now, its right below “Biographical Information”. I have some extra fields that I added below that, which I call with:
do_action(‘edit_user_profile’,$current_user);
So, I have the standard name, email, etc -> avatar 🙂 -> my custom fields like Google+, phone #, etc. How could I put the avatar at the bottom for example?
Thanks again Bangbay, from another LA Resident 🙂
You could try putting the avatar code in its own section. Underneath do_action('edit_user_profile',$current_user);
you could add
do_action('edit_user_avatar',$current_user);
Then in your functions.php, you can add this:
if(!is_admin()){
remove_action('edit_user_profile', array('wp_user_avatar', 'wpua_action_show_user_profile'));
remove_action('edit_user_profile', array('wp_user_avatar', 'wpua_media_upload_scripts'));
add_action('edit_user_avatar', array('wp_user_avatar', 'wpua_action_show_user_profile'));
add_action('edit_user_avatar', array('wp_user_avatar', 'wpua_media_upload_scripts'));
}
I was able to add it with that code, though I still have the old one in there as well. I’ll mess with it and try to figure that part out. I had some other questions in regards to the plugin, if you don’t mind… I just don’t know if I should create a whole new thread every time, or just add it here? Thanks again for all the help 🙂
If you’re also using ‘show_user_profile’, you’ll have to add this to the above block:
remove_action('show_user_profile', array('wp_user_avatar', 'wpua_action_show_user_profile'));
remove_action('show_user_profile', array('wp_user_avatar', 'wpua_media_upload_scripts'));
If you have questions that are for other features, please start a new thread or contact me privately. Thanks!