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?


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.

| improve this answer | |

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