Need Help with Activity Stream Loop Settings

I would like to embed the BP activity stream but I have no clue how to style it...mostly how to l set the number of posts it displays.
I know where to find the code:

The problem is I don't know what to do with it, or where to insert or change the parameters.
Can anyone help?

  • Sarah Gooding

    There are a couple examples in the codex. You'll need to play around with it to get it showing what you want. Basically you will make a custom loop. Here's one example:

    <?php if ( bp_has_activities( 'action=activity_update') ) : bp_the_activity(); ?>

    That filters the loop to only show status updates.

    Now, check out the list of parameters that bp_has_activities() will accept on that same codex page. You will see the max= option, which limits the number of activity items that can be returned. You can use it like this when customizing your loop:

    <?php if ( bp_has_activities( 'max=6') ) : bp_the_activity(); ?>

    Change the number to whatever you want. I hope those couple of examples help.