• Hey, I’m wanting to add some profile fields to a users settings page. In other, normal pages you can add settings fields using the add_settings_field function. Are there any similar functions for the user profile section? How can you add fields to that page?

    Thanks

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Look through /wp-admin/user-edit.php. There are a number of action hooks that you can hook and output your own HTML. You will need to handle getting and saving submitted data yourself. The “profile_update” action is generally a good choice for getting the submitted data from $_POST, validating and sanitizing it, then saving it to the appropriate part of the database, usually user meta.

Viewing 1 replies (of 1 total)
  • The topic ‘Profile settings API’ is closed to new replies.