Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: question about Group filtering


Boone Gorges
Keymaster

@boonebgorges

I would start by hooking a filter to bp_has_groups. The filter should loop through the results and unset the ones you don’t want to display, depending on what page you’re on. Thus, if you’re on a page where you only want to show public groups (as determined by, for instance, the content of $bp->current_action or $bp->action_variables, you would unset each member of the groups array for which bp_get_group_type() returned ‘public’.

Making group type an argument for bp_has_groups is a good idea for an enhancement.

Skip to toolbar