WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to remove some profile fields from the 'Profile' page according to the user roles. For removing the color picker I used remove_action("admin_color_scheme_picker", "admin_color_scheme_picker"). I want to remove these fields:

  1. Nickname
  2. Display name publicly as
  3. AIM, Yahoo, Google talk and About yourself fields
  4. The 'Show Admin Bar' section along with the 2 checkboxes

I went through the file 'user-edit.php' to see if there are any actions/filters that allow me to do so, but it seems there aren't. Can anyone tell me how to do this? Any help would be appreciated. Thanks

EDIT: Thanks @helenhousandi for the answer. I had already did it this way though.

add_action('admin_footer-profile.php', 'remove_profile_fields');
function remove_profile_fields()
    { ?>
        <script type="text/javascript">
            jQuery("h3:contains('Personal Options')").next('.form-table').remove();
            jQuery("h3:contains('Personal Options')").remove();
            jQuery("h3:contains('About Yourself')").next('.form-table').remove();
            jQuery("h3:contains('About Yourself')").remove();
<?php }

I know this is a bit longer, but it worked! I think I'll go with @helenhousandi's answer.

share|improve this question
Where should this go? functions.php? – humpdi Jan 22 at 13:16
Yes. It can go to functions.php or a plugin file. As long as the hooks are right, it will work from either of the places. – Rutwick Gangurde Jan 22 at 16:46
Ok, but if i put it in the functions.php, how do I return the javascript? with return or echo? – humpdi Jan 25 at 15:31
It seems that since WordPress v4.4.1, Nickname has become a required field and gives ERROR: Please Enter A Nickname when updating a user with this hidden but not populated, so you can't just hide it any more – icc97 Apr 6 at 22:08
up vote 9 down vote accepted

For the contact methods filter: user_contactmethods.

add_filter( 'user_contactmethods', 'update_contact_methods',10,1);

function update_contact_methods( $contactmethods ) {


return $contactmethods;
share|improve this answer
Thanks... got this one! Anything for the 'Show Admin Bar' and 'About yourself' sections? – Rutwick Gangurde Nov 3 '11 at 11:48
Please update this if you find a solution... I'm accepting your answer though. Thanks! – Rutwick Gangurde Nov 3 '11 at 14:35
+1 because as far as I can recall removing fields via PHP also stops WordPress from creating blank entries in the usermeta table. – Ashfame Apr 9 '12 at 13:12

Though the user_contactmethods filter is the one of the few for the user profile screen, since the other fields are not required in WordPress, you could use jQuery's .hide() and .remove() to effectively get rid of the ones you don't want without complications in terms of saving the information. Sure, a person without JS on would still see them, but that's a small minority and I'm guessing that the information changing there won't actually affect anything.

An example of removing the whole personal options piece (show admin bar and color scheme). I know it's not what you're looking for exactly, just wanted to give you a quick example I have on hand:

// remove personal options block
  remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
  add_action( 'personal_options', 'prefix_hide_personal_options' );
function prefix_hide_personal_options() {
<script type="text/javascript">
  jQuery(document).ready(function( $ ){
    $("#your-profile .form-table:first, #your-profile h3:first").remove();

Also, a note about the Show Admin Bar option: in 3.3 the admin bar is becoming the header and thus cannot be turned on or off, so it may not be worth worrying about.

I updated the code example to be more accurate and complete. Had some leftovers in there.

share|improve this answer
+1 Awesome! Awesome! (...but I like to hack the core, I call it 'enhancing'.) – EarnestoDev Nov 3 '11 at 15:03
Thanks! This is a nice solution! What I did was something similar but I used a different action hook so that my script runs only on profile.php. I also needed to do this for a specific custom role defined in my system. Updating my question with the answer. – Rutwick Gangurde Nov 12 '11 at 11:10
If you add the following to the jQuery it will also hide the Nickname and 'Display Name as' from the question: $("#nickname,#display_name").parent().parent().remove(); – icc97 Feb 1 '12 at 8:16
You can also use edit_user_profile hook. And not use the jQuery( document ).ready method to run the code instantaneously. Like this – Giraldi May 30 '12 at 7:24
Nickname is required now since WP v.4.4.1 – icc97 Apr 6 at 22:09

From the wordpress support forum you can do the removal using PHP. This removes the About Yourself section:

if (! function_exists('remove_plain_bio') ){
    function remove_plain_bio($buffer) {
        $titles = array('#<h3>About Yourself</h3>#','#<h3>About the user</h3>#');
        $buffer=preg_replace($biotable,'<h3>Password</h3> <table class="form-table">',$buffer,1);
        return $buffer;

    function profile_admin_buffer_start() { ob_start("remove_plain_bio"); }

    function profile_admin_buffer_end() { ob_end_flush(); }
add_action('admin_head', 'profile_admin_buffer_start');
add_action('admin_footer', 'profile_admin_buffer_end');

The code replaces the 'About Yourself' header with 'Password' and then strips out anything between that and the next table it finds (which is the password table).

Also the plugin WP Hide Dashboard does similar jQuery replacing if you want to extend that.

share|improve this answer
For future reference, you might wish to use admin_head-profile.php and admin_footer-profile.php instead – Cor van Noorloos Mar 18 '12 at 14:28


1) Removing a field may not be good, as on update, if you wont send the essential fields to WORDPRESS update hook, then it might set empty values to those fields! (for example, in submitting form, there should exists i.e. <input name="username".../>)
I Think, that it's better to HIDE from users visually only, with jquery .hide(); and not with .remove();
EXAMPLE code to hide "DISPLAY NAME" and "NICKNAME" fields:

jQuery(document).ready(function( $ ){

2) To hide admin bar, there is a special option in wordpress menu (in Settings). for custom code, like i.e.

add_action('after_setup_theme', 'remove_admin_bar');

function remove_admin_bar()
  if (!current_user_can('administrator') && !is_admin()) 
share|improve this answer

There's no filter to disable them. Look at the source (/wp-admin/user-edit.php) when you need to do stuff like this. You could hide them with JS but they can still be made visible and values are updated on POST.

Only viable option is to hack the core yourself. Just make sure you handle the update and disregard these fields on POST.

share|improve this answer
Yes, I checked that file already! The JS solution doesn't seem too secure. I'll see what I can do! Thanks! – Rutwick Gangurde Nov 3 '11 at 14:34
If the only solution you can think of is to hack core, then perhaps you shouldn't answer that particular question. You also don't need to suggest to the question asker to look at the file already mentioned, and you are also not correct in stating that there are no filters at all - surely you must have read the question and earlier answer first? – helenhousandi Nov 3 '11 at 14:53
@helenhousandi xoxo – EarnestoDev Nov 3 '11 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.