WordPress user profiles include several contact fields (e-mail address, a URL, AIM, Yahoo, and Google Talk) and these built-in contact fields are not always useful. It is possible to extend or remove some fields with just a few lines of code in functions file. In the following code we will add a Twitter field and remove AIM, Yahoo IM, Google Talk/Jabber.
// Change user contact fields profile function change_user_profile( $contactmethods ) { // Add Twitter field $contactmethods['twitter'] = 'Twitter Name (no @)'; // Remove AIM, Yahoo IM, Google Talk/Jabber unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); return $contactmethods; } add filter('user contactmethods','change_user_profile',10,1);
Geef een reactie