User Profile Section

Hi Adi,

nice course (WordPress Admin Customization).

But I miss how to customize, the profile section for the user. There are so many things, that are useless for the user. Where can I reArrange the Profile layout and delete diffrent things? I only, need, for example, Gender, fistname, lastname, day of birth, address, public name, new password, and avatar.

Is there a way to change the profile, too?

Cheers, Denis

Hey @DenisCGN– it’s always a good idea to tag people in forum posts you definitely want them to see.

cc @AdiPurdila (there you go :slight_smile: )

This seems to be a useless forum.

Hey @DenisCGN,

Sorry for the long wait. I actually do not know about customizing that page in particular, but it should be doable. I’ll do a bit of research and get back to you as soon as I can.

And I assure you it’s not a useless forum, it’s just my fault for not getting back to you sooner.

Hi again @DenisCGN,

I did a little digging and I found a few things.

First of all, there’s not a lot of customization you can do that page because there are very few filters/hooks you can use to add your own custom content. To do that, check out this great post.

Now, to remove things you’ll basically have to use either CSS or JavaScript. There is no good server side method. You could use an older filter called user_contactmethods and do something like this:

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

function new_user_contactmethods( $contactmethods ) {`
    unset( $contactmethods['aim'] );
    unset( $contactmethods['jabber'] );  
    unset( $contactmethods['yim'] );  

    return $contactmethods;
}

However, those contact methods are not used anymore.

Now, to use CSS you basically have to lookup the HTML structure and write the appropriate styles for that. For example, here’s the markup for the user last name:

<tr class="user-last-name-wrap">
	<th><label for="last_name">Last Name</label></th>
	<td><input type="text" name="last_name" id="last_name" value="" class="regular-text"></td>
</tr>

To hide that, simply do:

.user-last-name-wrap {
    display: none;
}

You could also use jQuery to select a specific element and then just hide it. I hope this helps somewhat, let me know :slight_smile:

Adi

Hello @AdiPurdila,
thanks for your answer…at the weekend I will give it a try.
Right now I watch your WP Bootstrap videos :slight_smile:
Cheers,
Denis