If you take into consideration that WordPress is the most widely used blogging platform, it is confusing why they are still living in the past. I am referring to the usage of AIM, Jabber, and Yahoo in the user’s profile. Currently, within WordPress, there is no way for you to modify these choices. However, with a few simple lines of code in our functions.php file, we can bring WordPress into the 21st century.
Instead of AIM, Jabber, and Yahoo why not use Facebook, LinkedIn, and Twitter? This would make more sense, wouldn’t it? Your choices are your own! There are really two ways to tackle this. First is replacing those mentioned, and second is just adding them to the list already.
Replacing AIM, Jabber, and Yahoo:
// -------------------------------------------------------------------------- // Start Replace User Profile Fields // -------------------------------------------------------------------------- function extra_contact_info($contactmethods) { unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); $contactmethods['facebook'] = 'Facebook'; $contactmethods['twitter'] = 'Twitter'; $contactmethods['linkedin'] = 'LinkedIn'; return $contactmethods; } add_filter('user_contactmethods', 'extra_contact_info'); // -------------------------------------------------------------------------- // Start Replace User Profile Fields // --------------------------------------------------------------------------
If you want to just add those instead of replacing:
// -------------------------------------------------------------------------- // Start Add User Profile Fields // -------------------------------------------------------------------------- function my_new_contactmethods( $contactmethods ) { //Add Twitter $contactmethods['twitter'] = 'Twitter'; //add Facebook $contactmethods['facebook'] = 'Facebook'; //add LinkedIn $contactmethods['linkedin'] = 'LinkedIn'; //add MySpace $contactmethods['myspace'] = 'MySpace'; return $contactmethods; } add_filter('user_contactmethods','my_new_contactmethods',10,1); // -------------------------------------------------------------------------- // End Add User Profile Fields // --------------------------------------------------------------------------
Note: These functions are not of my own creation, simply things I have found along the way. If you are the author of this function, please let me know so I can properly credit you with your work!
Great!