Skip to content

Instantly share code, notes, and snippets.

@johndugan
Created November 30, 2012 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johndugan/4173416 to your computer and use it in GitHub Desktop.
Save johndugan/4173416 to your computer and use it in GitHub Desktop.
WordPress: edit user fields
// Add customer user fields in wp admin
function modify_contactmethods( $contactmethods ) {
// Remove unwanted fields //
unset($contactmethods['aim']);
unset($contactmethods['yim']);
unset($contactmethods['jabber']);
// Add new fields //
$contactmethods['twitter_handle'] = 'Twitter Handle (@)';
$contactmethods['linkedin_url'] = 'LinkedIn Profile (URL)';
return $contactmethods;
}
add_filter('user_contactmethods','modify_contactmethods');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment