How to Remove Default Author Profile Fields in WordPress

Posted on April 14th, 2010 by in Tutorials | 11 Comments  
How to Remove Default Author Profile Fields in WordPress

Upon the release of WordPress 2.9, we shared with you an article that shows you how to add fields like twitter and facebook to author profile page. In this article we will show you how you can remove unwanted default author profile fields to make WordPress admin panel more user friendly for your clients.

How to Remove Default Author Profile Fields in WordPress

As you can see, we do not want to keep AIM, Yahoo IM, and Jabber/Gtalk. If you are dealing with very new level clients, then you do not want them to see this. It will only complicate things for them. To remove these default fields simply open your theme’s functions.php file and add the following code:

    <?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;
    }
    ?>

This will remove the contact methods like AIM, Jabber, and Yahoo IM. Now if you want to add fields then you should check out our article that talks about adding author profile fields in WordPress.

Source: Strangework by Brad Williams

About

Editorial Staff at WPBeginner mainly Syed and David.

Post comment as twitter logo facebook logo
Sort: Newest | Oldest
OneWorld 5 pts

That code raises in WP 3.2.1 following warnings. It removes those 3 entries though:

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'hide_profile_fields' was given in /wp/wp-includes/plugin.php on line 170 Warning: Invalid argument supplied for foreach() in /wp/wp-admin/includes/user.php on line 230

OneWorld 5 pts

I fixed it now. It had nothing to do with this code. I just put the "add_filter"-method into the __construct method and forgot to make the function public.

Other fix could have been (see "array(&$this"...:

add_action('user_contactmethods', array(&$this,'my_function'));

OneWorld

This is yet another example of the valuable information available at WP Beginner. Thanks guys.

This is great. I've already implemented it on two sites. Thanks so much!

aah excellent post, thanks a lot :)

I think wp should remove these by themself,
why aim,jabber lol they should add facebook and twitter :P

Thanks for this one guys. We restrict all of this so this is a perfect tool to ensure we don't have to see it either.

This is yet another example of the valuable information available at WP Beginner. Thanks guys.

Tweets about us: