Created
May 10, 2013 20:01
-
-
Save JiveDig/5556989 to your computer and use it in GitHub Desktop.
Add and remove fields from user profile
This file contains hidden or 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 and remove fields from user profile | |
add_filter('user_contactmethods', 'modify_top_contact_methods', 0); | |
function modify_top_contact_methods($profile_fields) { | |
// Remove old fields | |
unset($profile_fields['aim']); | |
unset($profile_fields['yim']); | |
unset($profile_fields['jabber']); | |
// Add new fields | |
$profile_fields['website_name'] = 'Website/Blog Name'; | |
/* $profile_fields['user_url'] = 'Website/Blog URL'; */ | |
$profile_fields['twitter'] = 'Twitter Username (without @)'; | |
$profile_fields['facebook'] = 'Facebook URL'; | |
$profile_fields['pinterest'] = 'Pinterest URL'; | |
$profile_fields['linkedin'] = 'LinkedIn URL'; | |
$profile_fields['instagram'] = 'Instagram Username'; | |
/* $profile_fields['gplus'] = 'Google+ URL'; */ | |
// To retrieve $twitter = get_the_author_meta('twitter'); | |
return $profile_fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment