Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bp_has_groups() Help


Boone Gorges
Keymaster

@boonebgorges

Yikes! bp_has_site_groups() was deprecated a couple versions ago. Use bp_has_groups().

Two ways to pass arguments:
1) bp_has_groups( 'type=random&max=3&user_id=' . $user_id ) (just to give you a sense of how you might put a variable in there

2) $args = array(
'type' => 'random',
'max' => 3,
'user_id' => $user_id
);
if ( bp_has_groups ( $args ) ) { ...

The second method is a bit easier to handle when you’re passing in a large number of arguments.

Skip to toolbar