Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to Exclude a Group From the Groups Loop

I’m totally up on my php so could someone help with converting this into an ‘if’ ‘else’ statement that allows for multiple group names rather than just one.

So far I’ve got this
if(bp_get_group_name() != ‘Community’ ) : if(bp_get_group_name() != ‘General’ ) : if(bp_get_group_name() != ‘Off Topic’ ) :

but I need to endif 3 times which surely isn’t the best way. And also I can get an else in there.

To put some context around this, I plan on having a number of groups for forums only, and new members will automatically be added to them, so I plan on hiding the item-header and nav section on these group pages and show a new

in there instead. Then when they are removed from the groups page and widgets they’ll only be accessible through the forums. :)

Skip to toolbar