This topic has 9 replies, 3 voices, and was last updated 7 years by Kieran_SQ.

  • Author
  • #201480
     vladislav
    Participant

    I want to remove (not hide!!!) the ”@name” that appears above the main profile picture in members profiles. It appears like this when inspecting the element in the browser <span class="user-nicename">@sandra</span> . How can I remove the @name from all profiles? Thank you.

    I tried to use the solution I found in internet (added special code to the bp-custom.php file), but it did not work. So it may be the theme’s problem. The code I talked about I show you below:

    /* remove @username from the profile header */

     

    function bpfr_remove_mention_from_profile() {

     

    echo ‘<style> h2.user-nicename { display:none; } </style>’; // hide the h2 containing the @

     

    if( bp_is_user() && ! bp_get_member_user_id() ) {  // be sure we get the right user_id

    $user_id = ‘displayed: ‘. bp_displayed_user_id();

    } else {

    $user_id = ‘get_member_user: ‘. bp_get_member_user_id();

    }

     

    remove_filter( ‘bp_get_displayed_user_mentionname’, bp_activity_get_user_mentionname( bp_displayed_user_id() ) );

     

    }

    add_filter( ‘bp_get_displayed_user_mentionname’, ‘bpfr_remove_mention_from_profile’ );

     

    #201519
     Laura
    Moderator

    Hello, just disable the mention feature at Settings – Buddypress 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #201529
     vladislav
    Participant

    Your answer is not clear or wrong. I could not disable the mention feature at Settings – Buddypress, because there is no one. In any case, I do not see it. If there is exist – give me the name of it and screenshot. And once again – I want to remove (not hide!!!) the ”@name” that appears above the main profile picture in members profiles. I want to remove only this one thing, not the bundle of things.

    #201603
     Laura
    Moderator

    Hello, then we need to change it at the template, I can do this for you if you share ftp access 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #201618
     vladislav
    Participant

    Hope this reply will be hidden because I show login-pass information. Please, confirm that nobody sees this message except you.

    Can you tell me what changes you will do with template files?

    While disabling displaying username (@name), could you also make changes to autogenerated profile links? Right now they look like https://animematch.com/members/sweetadmin/ . The “sweetadmin” part is the username too. Can you change it to something else? For example, can we use member’s Id in this link instead of username?

    FTP
    host: 192.145.239.214
    login: animematch@animematch.com
    pass: uNWvdRdl53aX@w*xAwz3^y$
    port: 21

    Website: https://animematch.com/
    login: sweetadmin
    pass: 4)uNWvdRdl53aX@w*xAwz3^y$

    #201691
     Kieran_SQ
    Moderator

    Hi,

    To confirm your above reply is marked as private and only you and SeventhQueen support staff can see the content.

    I have copied cover-image-header.php from the SweetDate parent theme

    /wp-content/themes/sweetdate/buddypress/members/single/cover-image-header.php

    To the SweetDate Child theme

    /wp-content/themes/sweetdate-child/buddypress/members/single/cover-image-header.php

    I removed line 48 for you that had the below code which generated the @username text on the individual profile (see screenshots)

    <span class="user-nicename">@<?php bp_displayed_user_username(); ?></span>

    With regards to changing the BuddyPress profile URL this may be problematic and cause performance issues given how BuddyPress activity data is stored. If you wanted to achieve this custom development then this post would be a good starting point https://bbpress.org/forums/topic/user-profile-url-uses-the-username-can-that-be-changed/.

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #201723
     vladislav
    Participant

    Thank you! You did exactly what I want

    #201728
     Kieran_SQ
    Moderator

    Hi,

    Happy to help 🙂 Do you consider this ticket resolved?

    All the best,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #201731
     vladislav
    Participant

    Yes, it is resolved

    #201734
     Kieran_SQ
    Moderator

    Great, I’ll mark it as resolved.

    Feel free to open a new ticket any time and I’ll be happy to assist.

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?