Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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