Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Cancel Friendship button option from buddypress site


  • vanchalakhotia
    Member

    @vanchalakhotia

    Hi !

    Creating a buddpress multisite for a closed group. They don’t want an option of Cancel Friendship in the site.How can we remove it from the code.

    Please help !

    Regards,
    Vancha

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

  • danbpfr
    Participant

    @chouf1

    The raw solution:
    Go to bp-friends/bp-friends-template.php and comment the whole case “is_friend” between line 329 and 344.

    The better solution:
    rewrite the function bp_get_add_friend_button who contains the switch given in the above solution and put it in your child theme’s function file.


    vanchalakhotia
    Member

    @vanchalakhotia

    Thank you so much . I deleted the line of code between 329 and 344. Its working fine now and the button is not showing. Only concern is will it effect the rest of the programming eg. add freind, etc.

    Regards,
    Vancha


    hridaya
    Member

    @hridaya

    how to override the bp_get_add_friend_button on themes functions.php i have tried but it got erros..

    Thank you
    hridaya


    Andrea Reed
    Participant

    @canadadre

    I used this in my child theme stylesheet and it worked on the Members Directory page:

    #buddypress #members-dir-list a.friendship-button.is_friend.remove {
    display: none;
    }
    

    What is nice is that when you click on the profile of someone who is a friend, you can still cancel the friendship there if you need to.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Cancel Friendship button option from buddypress site’ is closed to new replies.
Skip to toolbar