BuddyDev

Search

Where to change the buttons at the profile header?

  • Participant
    Level: Initiated
    Posts: 1
    Josh on #54001

    Hello,
    I hope you can help me with this. I want to change the buttons at the profile header on the user profile.
    I have 4 buttons there, one for friendship, one for public and private message and one to block a user.
    This is the html code for the first button:

    
    <button id="friend-26" class="friendship-button not_friends add" rel="add" title="Add friend" data-bp-nonce="http://localhost/members/jon/friends/add-friend/26/?_wpnonce=2228b5ba33" data-bp-btn-action="not_friends">Add friend</button>
    

    I just want to add a span tag for each of the buttons like this:

    
    <button id="friend-26" class="friendship-button not_friends add" rel="add" title="Add friend" data-bp-nonce="http://localhost/members/jon/friends/add-friend/26/?_wpnonce=2228b5ba33" data-bp-btn-action="not_friends"><span>Add friend</span></button>
    

    So for the button message ,”send message” should become to “<span>send message</span>” and so on.
    Where can I make these code changes? I searched buddypress but can’t find a doc how to do this. I just found your article how to add two more buttons.
    Make the changes at bp_nouveau_member_header_buttons

  • Participant
    Level: Initiated
    Posts: 1
    Josh on #54002

    I found the 4 files where I can make my changes. It is bp-friends-template, bp-activity-template, bp-messages-template and class-bp-toolkit-block.

    Regarding the first 3 templates. Will they be overwritten on next buddypress update? And how can I protect them?
    Copying those files to the child theme does not work regarding to this post: https://buddypress.org/support/topic/copy-buddypress-files-into-child-theme/.

You must be logged in to reply to this topic.

This topic is: not resolved