Update users custom profile fields
-
16-10-2019 - |
Question
Ok guys, i have problem when using some trics from here or other sites. Im trying to use this method of adding custom user fields. But, when i add this, everytime i save it
s all ok, but when i come back to edit something different in user profile, those new fields just goes blank, and if i did not input again my data in those fields and save my profile, those fields goes blank in DB. So, something is not ok that need to show me what i did just saved.
As I told, it`s all ok until i open again my profile for editing.
Ok, here is code, http://pastebin.com/u9syYRF3
Solution
You have specified the value of the <textarea>
in a value
attribute, but for a <textarea>
you must put it between the two tags:
<textarea rows="10" cols="60" name="adsense_336" id="adsense_336" class="regular-text" ><?php echo esc_attr( get_the_author_meta( 'adsense_336', $user->ID ) ); ?></textarea>
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange