I would like to add avatars to my users. I have a limited group on a site I’m working. Uploading isn’t really a problem we can just put the images on the server and use URL’s to set our avatars(Only about 5 people will actually be able to post.). That said how would I add a field to the user page they can fill out with a image URL that can then be fetched later. I know you can fetch user data via the the_author_meta();
function but how do I add a custom user field that can them be filled out and put into the database that is the associated with the user?
Or would if just be better to use something that already exist like the aim
field for example since none of us will be filling that out.
To add a field to the profile/user edit page you need to use the
edit_user_profile
hook andshow_user_profile
hook so:then to save that field you need to use
personal_options_update
hook andedit_user_profile_update
hook so:and as you already know you can featch that data using
the_author_meta()
orget_user_meta()