Replies
- Michael on April 7, 2022 at 4:46 pm in reply to: Can I hide “Add Friend” buttons when viewing Buddypress Profile>Friends? #44328
Ravi,
That works perfectly.
And is exactly what I wanted to achieve.
I appreciate your help very much indeed.
Thankyou sir! - Michael on April 7, 2022 at 1:19 pm in reply to: Can I hide “Add Friend” buttons when viewing Buddypress Profile>Friends? #44324
I tried changing the above to:
if ( bp_is_members_directory() || bp_is_friends_component() )
which does hide the Add Friend buttons in the user’s Friends list (which I want), but also unfortunately hides the Add Friend button at the top of the profile (which I don’t want).
Could this be improved on?
Thankyou!
- Michael on April 7, 2022 at 12:29 pm in reply to: Can I hide “Add Friend” buttons when viewing Buddypress Profile>Friends? #44322
Thanks Ravi,
– Add Friend/Private Message buttons are hidden on profile page using “BP Registration Options” plugin, for new members only, once ‘approved’ those buttons become visible to the user.
– Add Friend button is hidden on members page (for all users) using code snippet:
/** * Hide "Add Friend" button on members list & search results list */ add_filter( 'bp_get_add_friend_button', function ( $button ) { if ( bp_is_members_directory() ) { $button = array(); } return $button; } );
– So I need the similar functionality as the snippet above; simply hide the Add Friend buttons in the Friends list (for all users), but the friends feature is not disabled.
Thanks!
- Michael on April 7, 2022 at 12:06 am in reply to: Can I hide “Add Friend” buttons when viewing Buddypress Profile>Friends? #44309
Sorry, this post should be in Buddypress not Themes.