Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Filtering activities by recorded date


Boone Gorges
Keymaster

@boonebgorges

In the past I have done this by grabbing a large number of activities with bp_has_activities, and iterate over the items with foreach( $activities->activities as $activity). For each $activity, check the time. Once they’re older than 24 hours, chuck the rest of $activities->activities.

Not ideal, and not really good for efficiency (since you end up looping through the array twice, once during this purge and once during while ( bp_activities() )) but better than nothing :)

Skip to toolbar