BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 2
    Rob Sumner on #42057

    Hi Ravi,

    Many thanks for your help. Unfortunately, the code did not work, but I was able to use some of your code combined with another to create a solution that does seem to work:

    //remove Join/Leave Button
    function bp_remove_group_join_button( $button, $group ) {

    $group_types = (array) bp_groups_get_group_type( $group->id, false );

    // Replace by your group type id.
    if ( in_array( ‘class’, $group_types ) ) {
    return ”;
    }

    return $button;
    }
    add_filter( ‘bp_get_group_join_button’, ‘bp_remove_group_join_button’, 10, 2);

    This takes all control away from the front-end so only admins can add or remove members (children) from the class groups.

    Thanks,
    Rob

  • Participant
    Level: Initiated
    Posts: 2
    Rob Sumner on #41992

    Hi Ravi,
    Thanks for replying.
    I am using BuddyPress with the Nouveau template pack (and Buddy X theme)
    Yes, the taxonomies are the BuddyPress Group types.

    Thanks,
    Rob