Edit Contact Info Fields In User Profile
We all love WordPress.
Well, at least I imagine that we do – if you hate WordPress, then you may want to ask yourself why you’re here. Maybe you’re some kind of masochist who gets kicks out of reading tips about a content management system that they hate.
Sorry – I’ve wandered a bit off topic. What I was going to say is that we all love WordPress – but it does turn up some oddities at time.
Take the User Profile screen for example. Can someone please explain to me why WordPress thinks that the primary means of communication these days include AIM, Yahoo IM and Jabber?
Fortunately, there is a very quick and easy way of editing and adding to the fields you see above.
FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.
FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.
Let’s say that we wanted to get rid of the last three fields, and put in a Facebook and Twitter field. Just head over to your functions.php file and include the following:
function new_contactmethods( $contactmethods ) {
$contactmethods['facebook'] = 'Facebook';
$contactmethods['twitter'] = 'Twitter';
unset($contactmethods['aim']);
unset($contactmethods['yim']);
unset($contactmethods['jabber']);
return $contactmethods;
}
add_filter('user_contactmethods','new_contactmethods',10,1);
As you can probably figure out, the variable $contactmethods
defines new fields, and applying unset
to a field removes it. So simple, even I could do it!
Creative Commons photo courtesy of Markusram
Tags: