Re: Show: By Latest Post | By Group
I told you to use include= but I realized that you can’t pass multiple groups into bp_has_groups() in the 1.2 branch. My bad.
So you might want to try @modemlooper‘s advice. The group slug is whatever shows up in the URL as the group name. For example, a group with URL http://example.com/groups/i-am-awesome has the slug i-am-awesome. You should be able to get that group only by using the following:
`if ( bp_has_groups( ‘slug=i-am-awesome’ ) )`
Then, as Modemlooper says, you’d have to do it a couple times for each group. Or better yet, make an array and loop over it:
`$groups_to_show = array( ‘i-am-awesome’, ‘i-am-cool’, ‘bodacious’ );
foreach ( $groups_to_show as $g ) {
if ( bp_has_groups( ‘slug=’ . $g ) ) {
// do all your group-specific stuff here
}
}
`