Skip to content

Instantly share code, notes, and snippets.

@greenweb
Created August 25, 2016 21:20
Show Gist options
  • Save greenweb/81634def04a8a3c9533e07bf19c6e8d5 to your computer and use it in GitHub Desktop.
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.
<?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