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.

Related posts:

  1. How To: Hide an Admin Menu in WordPress
  2. How To: Redirect A User After Logging Into WordPress
  3. How To: Create Backdoor Admin Access in WordPress
  4. How To: Load User Info Using the Admin Email in WordPress
  5. How To: Add a Post Thumbnail to an RSS Feed in WordPress
Enjoy this post? Be sure to subscribe to my RSS feed and my WordPress Tips and Tricks Newsletter! Also check out my new book: Professional WordPress

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. Arturo says:

    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. Arturo says:

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

  6. AH says:

    Any way to remove the “pages” field?

  7. Andrew says:

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

    • Alex says:

      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. atozvision says:

    Thanks for these useful tips.

  11. andrew says:

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

    Visual Editor
    Admin Color Scheme
    Keyboard Shortcuts
    Show Admin Bar

    thanks!

Trackbacks

  1. [...] pequeño hack que, una vez insertado el código en el fichero 'functions.php' de tu tema activo, elimina del perfil aquellos campos que te sobren …  Clic para ver Texto Plano [...]

  2. [...] you should check out our article that talks about adding author profile fields in WordPress.Source: Strangework by Brad WilliamsSimilar PostsHow to Rewrite Guest Author Name with Custom Fields in WordPressMost Notable Features [...]

  3. [...] ’s article was cited/ripped off heavily on other sites for accomplishing the removal of the AIM, Jabber, and Yahoo! Instant Messenger with [...]

Speak Your Mind

*