1

I was wondering if anyone knew of a way to show specific styles to the activity loop depending on the activity type?

This is what I had an idea of:

function mycustom_act_type() {
if ('friendship_created' != bp_get_activity_type() )
echo ' style="background:red;" ';
}

and this is in the <li> whithin the loop:

<li <?php mycustom_act_type()?> >blah </li>

but obviously doesn't work. Any ideas?

closed as off-topic by birgire, Nicolai, fuxia Aug 6 '14 at 18:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

Looking at http://testbp.org/activity/, that activity feed has classes on each list item indicating the activity type. If you can look at that theme, I suspect you'll find the code to add the right class for your styles.

Not the answer you're looking for? Browse other questions tagged or ask your own question.