Skip to:
Content
Pages
Categories
Search
Top
Bottom

getting array of all groups


  • mort3n
    Participant

    @mort3n

    Hi,

    I need to list all (public) groups and all members on a subpage of the user profile page.

    The listing of all members have already been addressed in a previous thread on this site, but I can’t seem to find a way to list all groups.

    The Codex specifies the function bp_groups(). Using this however only gets the groups that the current user is a member of.

    Any suggestions?

    Cheers
    Mort3n

    EDIT:
    pip if ( bp_has_groups() ) :
    <h3>my heading</h3>
    pip while ( bp_groups() ) : bp_the_group();
    pip if( ‘public’ == bp_get_group_status() ) {
    <input type=checkbox name="groups[]" value=" pip bp_group_id(); " pip bp_group_name();

    pip }
    pip endwhile;
    pip endif;

Viewing 1 replies (of 1 total)

  • ripulkr
    Participant

    @ripulkr

    use this:

    $vgroups = $groups = BP_Groups_Group::get(array(
    							'type'=>'alphabetical',
    							'per_page'=>999
    							));
    						print_r($vgroups);
Viewing 1 replies (of 1 total)
  • The topic ‘getting array of all groups’ is closed to new replies.
Skip to toolbar