Created
August 25, 2016 21:20
-
-
Save greenweb/81634def04a8a3c9533e07bf19c6e8d5 to your computer and use it in GitHub Desktop.
Add extra user info to the user settings page in a wp.org site.
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
<?php | |
function my_new_contactmethods( $contactmethods ) { | |
//add Birthday | |
$contactmethods['birthday'] = 'Birthday'; | |
//add Address | |
$contactmethods['address'] = 'Address'; | |
//add City | |
$contactmethods['city'] = 'City'; | |
//add State | |
$contactmethods['state'] = 'State'; | |
//add Postcode | |
$contactmethods['postcode'] = 'Postcode'; | |
//add Phone | |
$contactmethods['phone'] = 'Phone'; | |
//add Mobilphone | |
$contactmethods['mphone'] = 'Mobilphone'; | |
return $contactmethods; | |
} | |
add_filter('user_contactmethods','my_new_contactmethods',10,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods
https://generatewp.com/user-contact-methods/