Skip to:

How to remove xProfile names and replace with username

  • robertFudge


    Hi There,

    I need to hide the xProfile “names” of members across the site and use usernames only. I have tried this:

    Plugin: BuddyPress Usernames Only
    wp-config.php: define( ‘BP_SHOW_DISPLAYNAME_ON_PROFILE’, false );

    But I still see the xProfile name” in the profile header and bread crumbs, any idea how I can active only showing usernames across the entire site?

Viewing 6 replies - 1 through 6 (of 6 total)

  • aussiemike


    Hi Robert
    This did not work for me.I am trying to hide the display name altogether. Did you find a solution?


    Renato Alves


    Check out this thread: Maybe it can help.



    Hi Mike,

    I don’t think that you can entirely remove the xProfile name field from BuddyPress (Even with the plugin that is available). So I decided why fight it? I cloned the WP username. The only potential problem with this is that the WP username is public – I used a plugin to force stronger WP username and passwords to help with this.

    Here is the base of what I did:

    – On the registration form hide the xProfile name field (CSS display: none) and make a javascript listener (CHANGE) function to change the xProfile name field to the value of the WP username. This will take care of the form validation – xProfile name field is required. See reference…

    – For the edit your profile section I hide the xProfile name field, I also included a PHP function that made the value of this equal to the WP username, in the state that a user was added from the dashboard. (I did not provide PHP, I essentially grabbed WP logged in username…) – You can also display the xProfile name field input as readonly (add attribute: readonly).

    Now all xProfile name field instances in BP are the same as the WP user.

    jQuery(‘input#signup_username’).change(function () {



    Thank Robert. I will take a look into this. I am sort of getting the hang of things with BP. I have Wishlist Member running on the site so registration is through a custom registration form, no BP registration. This has caused me some headaches because WLM does not integrate fully with BP.

    Thanks again for your reply and your time.Much appreciated.




    @Robert thank you for the reference. I’m actually looking something like this. great tips



    i found this somewhere online after hours of searching! wored for me… add to functions.php

    function my_member_username() {
    	global $members_template;
    	return $members_template->member->user_login;
    add_filter( 'bp_member_name' , 'my_member_username' );
    function my_bp_displayed_user_fullname() {
    	global $bp;
    	return $bp->displayed_user->userdata->user_login;
    add_filter( 'bp_displayed_user_fullname' , 'my_bp_displayed_user_fullname' );
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to remove xProfile names and replace with username’ is closed to new replies.
Skip to toolbar