Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove xProfile names and replace with username

  • Avatar of robertFudge
    robertFudge
    Participant

    @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 5 replies - 1 through 5 (of 5 total)
  • Avatar of aussiemike
    aussiemike
    Participant

    @aussiemike

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

    Regards
    Mike

    Avatar of Renato Alves
    Renato Alves
    Participant

    @espellcaste

    Check out this thread: http://buddypress.org/support/topic/username-vs-display-name/ Maybe it can help.

    Avatar of robertFudge
    robertFudge
    Participant

    @robertfudge

    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.

    Reference:
    jQuery(‘input#signup_username’).change(function () {
    jQuery(‘input#field_1′).val(jQuery(this).val());
    });

    Avatar of aussiemike
    aussiemike
    Participant

    @aussiemike

    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.

    Mike

    Avatar of jaybee08
    jaybee08
    Participant

    @jaybee08

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

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

You must be logged in to reply to this topic.