How to change the default contact information fields of your WordPress users

By default WordPress comes with a set of fields where users can place their contact information such as email-address, website url and links to their social media accounts. If you need another field or don’t need  one of the default fields, you can simply add or remove them with this little code snippet.

function new_contactmethods( $contactmethods ) {
  $contactmethods['xing'] = 'Xing Profil URL'; 
  unset($contactmethods['instagram']); 
  unset($contactmethods['soundcloud']); 
  unset($contactmethods['wikipedia']); 
  unset($contactmethods['youtube']); 
  unset($contactmethods['twitter']); 
  unset($contactmethods['myspace']); 
  unset($contactmethods['tumblr']); 
  unset($contactmethods['pinterest']); 

  return $contactmethods;
}
add_filter('user_contactmethods','new_contactmethods',10,1);

Just place this filter in your (child-)themes functions.php and  remove (unset) fields you don’t need or add new fields, like I did with the Xing URL.

Leave a Comment

Your email address will not be published. Required fields are marked *