Posted By

blueocto on 04/16/11


Tagged

php wordpress


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

srdjan


Wordpress : Change the Contact Info Form


 / Published in: PHP
 

In the User settings, there is a web form called Contact Info. It has input fields for the user’s AIM account, Yahoo IM account, and so on.

But how about Twitter? What about Facebook? Out of the box, the Contact Info panel doesn’t have these input fields.

If you have multiple users on your WordPress blog, you might want to add new fields and remove old ones.

  1. function new_contactmethods( $contactmethods ) {
  2. $contactmethods['twitter'] = 'Twitter'; // Add Twitter
  3. $contactmethods['facebook'] = 'Facebook'; // Add Facebook
  4. unset($contactmethods['yim']); // Remove Yahoo IM
  5. unset($contactmethods['aim']); // Remove AIM
  6. unset($contactmethods['jabber']); // Remove Jabber
  7.  
  8. return $contactmethods;
  9. }
  10.  
  11. add_filter('user_contactmethods','new_contactmethods',10,1);ne

Report this snippet  

You need to login to post a comment.