Skip to:

Adding a Class to Activity stream posts

  • Hi All,

    I’m having a little bit of a problem modifying Buddypress…

    I want to add the user’s id to the class of their post on the activity streams. Something like this:

    `<li id="activity-01" class="activity activity_update “>`

    If somebody could let me know how this is achieved or at least point me in the right direction – I would be most greatfull :)

Viewing 2 replies - 1 through 2 (of 2 total)

  • r-a-y


    Easy way is to modify `/activity/entry.php` in your child theme.

    The other (and better) way — if you know your way around WordPress filters — is to hook into the “bp_get_activity_css_class” filter located in bp-activity-templatetags.php.

    Thanks for the pointer r-a-y; completely overlooked that file.

    I took the easy route; via modifiying the `/activity/entry.php` file.

    For anybody else who is trying to accomplish this, just replace the 5th line with this:

    `<li class=" user-” id=”activity-“>`

    Thanks again for the help r-a-y! :)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a Class to Activity stream posts’ is closed to new replies.
Skip to toolbar