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.
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
how to override the bp_get_add_friend_button on themes functions.php i have tried but it got erros..
Thank you
hridaya
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.