How to Add and Remove WordPress Profile Fields

Ever want to add profile fields in your wordpress profile page, or how about removing a profile field from your wordpress profile. Here you’ll see how to:

  1. Add a profile field to your author page aka profile page
  2. Remove a profile field from your wordpress profile page
  3. Call the custom profile information  somewhere within your blog post
<?php
function my_new_contactmethods( $contactmethods ) {
	  // Remove Yahoo IM
     unset($contactmethods['yim']);
    // Add Twitter
    $contactmethods['twitter'] = 'Twitter';
    //add Facebook
    $contactmethods['facebook'] = 'Facebook URL';
    return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
?></code>

And then to call is within you post or pages just edit your template files and add:

<code><?php echo the_author_meta('facebook');?>
  • Trackback are closed
  • Comments (2)
  1. With regard to what you say to add the funcion’my_new_contactmethods’ I do not paid off, add the line of code in ‘registration.php’ maybe I’m doing something wrong, can you help me?
    : /

    greats

      • Kurt
      • June 20th, 2010

      can you give me some thing out of your error log? this should work just fine sir. without errors I cant help you