Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Hidden or Public type of group?


  • Dule95D
    Participant

    @dule95d

    Hello,

    I found one topic here about that, but it didn’t have any changes for me.

    And here is my code in bp-custom.php:

    <?php
    function my_filter_group_stati( $stati ) {
    if( $key = array_search( ‘hidden’, $stati ) ) {
    unset( $stati[$key] );
    }

    return $stati;
    }
    add_filter( ‘groups_valid_status’, ‘my_filter_group_stati’ );
    ?>

    Any suggestion? And i would like to have only private group.

Viewing 1 replies (of 1 total)

  • danbp
    Participant

    @danbp

    You can remove the creation option from the template. You have to do this from within a child theme by using a template overload.

    Concerned file is bp-templates/bp-legacy/buddypress/groups/create.php

    Part to remove for the “hidden” option is

    <label>
    	<input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 
    	<strong><?php _e('This is a hidden group', 'buddypress' ); ?></strong>
    </label>
    	<ul>
    		<li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
    		<li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
    		<li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
    	</ul>
Viewing 1 replies (of 1 total)
  • The topic ‘Remove Hidden or Public type of group?’ is closed to new replies.
Skip to toolbar