Hi,
Thanks for the help of my last topics in the support forum.I just wonder that is there any way to prevent Group Members to leave group? My thinking is when users joined the Group, just disable or hide the “Leave Group” button.
So, could you help me to solve it? Thanks.
Hi Dandy
Please try this code in your bp-custom.php
function buddydev_remove_leave_group_button( $btn ) { if ( $btn['id'] == 'leave_group' ) { unset( $btn['id'] ); } return $btn; } add_filter( 'bp_get_group_join_button', 'buddydev_remove_leave_group_button' );
Thank You
RaviHi, Ravi
Thanks for your reply and help.This code snippet works perfectly as exactly the same as I expected. Thank you very much.
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘ [Resolved] Hide "Leave Group" button when user already joined the Group’ is closed to new replies.
This topic is: resolved