How To: Remove Default Profile Fields in WordPress

A few days ago I came across an interesting challenge in WordPress. I wanted to hide some of the default profile fields from being displayed to the users in WordPress. Specifically I wanted to hide the AIM, Yahoo IM, and Jabber / Google Talk fields. It took a bit of digging but I found the below function buried in the WordPress.org support forums. Just place the below code in your themes functions.php file to remove these fields:

<?php
add_filter('user_contactmethods','hide_profile_fields',10,1);

function hide_profile_fields( $contactmethods ) {
  unset($contactmethods['aim']);
  unset($contactmethods['jabber']);
  unset($contactmethods['yim']);
  return $contactmethods;
}
?>

That’s it! As you can see below the three fields are removed from the Profile page on the WordPress admin side. This makes it much less confusing for users since they don’t see fields that we aren’t using on the website.

Enjoy this post? Be sure to subscribe to my RSS feed and my WordPress Tips and Tricks Newsletter! Also check out my WordPress books: Professional WordPress Third Edition & Professional WordPress Plugin Development

Comments

  1. Thanks for the snippet.

    It’s really nice to see how the functions.php file of a theme is able to interact not only with the appearance of a blog, but also with the dashboard, isn’t it?

  2. sandlog says:

    that is great code.

    how can we add to it to hide the “website” field as well?

    i’ve tried using “url” and “website” and it doesn’t hide it.

  3. Hi, that code works great! but I was also wondering if there’s a way to remove or at least rename the “About youself” Section.
    Thanks for the help!

  4. @Arturo:

    You can rename the field “Abour yourself” editing de .MO file of your translation 😉

    Great hack 🙂

  5. Ha! Perfect! the mo hack did it, I just rename it to what I wanted and looks perfect! thanks

  6. Any way to remove the “pages” field?

  7. How would one go about removing the biographical field and the website url field?

    • Yeah… no one anywhere can offer a way to remove the website field.

      I don’t EVER want to resort to removing it from within core but I can’t any other option at this point.

      Anyone?

  8. Many thanks Brad,

    this had been annoying me for a couple of hours before I found your post!

    Do you know if there is a way of replacing the labels on fields too? (for example replacing the “Facebook” label with “LinkedIn”)

    Cheers,
    Andrew

  9. […] How To: Remove Default Profile Fields in WordPress ??? Brad Williams Blog […]

  10. Thanks for these useful tips.

  11. is there a way to remove the first fields that appear:

    Visual Editor
    Admin Color Scheme
    Keyboard Shortcuts
    Show Admin Bar

    thanks!