Created
June 1, 2014 12:24
-
-
Save simonlk/164e25293343bc502dda to your computer and use it in GitHub Desktop.
Add/Remove custom fields in WordPress 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
/* ===================================================== | |
Custom profile field | |
===================================================== */ | |
function modify_contact_methods($profile_fields) { | |
// Add new fields | |
$profile_fields['company_name'] = 'Company Name'; | |
// Remove old fields | |
unset($profile_fields['aim']); | |
return $profile_fields; | |
} | |
add_filter('user_contactmethods', 'modify_contact_methods'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment