• Hi, I’m having a problem with update_user_meta. I am trying to add custom fields to user profiles, I get the fields to display in profile.php, but everytime I try to save the data using update_user_meta it wont save. For most of the users the meta key doesn’t exist, so update_user_meta should create it, but it doesn’t…

    Can anyone spot my mistake?

    http://pastebin.com/tBRt11fc

Viewing 4 replies - 1 through 4 (of 4 total)
  • I spotted two things. First, you are missing the call to global $nff_custom_fields; in your nffpc_save_custom_profile_field function so the variable is undefined. Second, on line 58 and 59 your callback functions have an ‘s’ on the end, but your function name on line 44 does not.

    Thread Starter vilhjalmurv

    (@vilhjalmurv)

    Thanks, I tryed that, but not working so far 🙁

    Thread Starter vilhjalmurv

    (@vilhjalmurv)

    Got it to work with your help, just forgot that i changed update_user_meta to update_user_option when I was troubleshooting.

    Awesome. Glad to hear.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘update_user_meta not working’ is closed to new replies.