How can I set up activity data from an array (of objects or IDs)?
Given the following code:
do_action( 'bp_before_activity_loop' ); if ( bp_has_activities( bp_ajax_querystring( 'activity' )."&scope=groups") ) : while ( bp_activities() ) : bp_the_activity(); $act_ID = bp_get_activity_id(); $wall_activities = $act_ID; endwhile; endif; do_action( 'bp_after_activity_loop' );
How could I iterate over $wall_activities in a following foreach such that calling bp_get_activity_id() (in the subsequent foreach) would give me the appropriate ID from the array I defined? I know that I could just do what I need to do in the initial while, but I need to run multiple of while’s and then do some operations on the collected activity data.
You must be logged in to reply to this topic.