Remove Aim, Yahoo IM, Jabber Contact Info From WordPress Profile

This page is in the Code Graveyard where I lay to rest snippets of code that I don't use anymore. Some have lost their usefulness due to the evolving nature of the web, while others have been replaced with better code. "Be Ye Warned!"

This function removes these fields from the Contact Info section of the WordPress user profile admin page:
AIM
Yahoo IM
Jabber/Google Talk

// Remove Silly Contact Methods

function removesilly_contactmethods( $contactmethods ) {
// here you could add other fields
  unset($contactmethods['yim']); // Remove Yahoo IM
  unset($contactmethods['aim']); // Remove AIM
  unset($contactmethods['jabber']); // Remove Jabber

return $contactmethods;
}

add_filter('user_contactmethods','removesilly_contactmethods',10,1);

If you want to add fields for users to enter their Facebook profile URL, and their Twitter, and Google Plus, take the following code, and insert it into line 4 in the code above.

$contactmethods['facebook'] = 'Facebook'; // Add Facebook
$contactmethods['twitter'] = 'Twitter'; // Add Twitter
$contactmethods['gplus'] = 'Google+'; // Add Google Plus

See more:

We've One Response

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]