Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: need exclude parameter for bp_has_activities()


Roger Coathup
Participant

@rogercoathup

@anointed – yes, it looks like you can specify blog_ids to specifically include, but not to exclude, in a call to bp_has_activities()

My suggested workarounds:

If you want to exclude the blogs on all calls to bp_has_activities() – Hook a function onto the bp_has_activities filter. That function should process the activities_template (passed as a parameter) removing the entries where the primary_id is in your blog ids to exclude.

If you want to exclude the blogs on one specific call to bp_has_activities() – Check the primary_id of the activity item at the start of your loop, and skip processing if it’s in your list of blog ids to exclude. It’s not the most efficient, and might be a pain if you are counting returned results, but should work.

Cheers, Roger

Skip to toolbar