Created
November 30, 2012 02:32
-
-
Save johndugan/4173416 to your computer and use it in GitHub Desktop.
WordPress: edit user fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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