Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where’s the markup for bp_activity_comments()?

  • Hello, I’m new to BuddyPress and trying to create my first theme – as a child for the default one.

    I can’t find the file that’s responsible for the markup of bp_activity_comments() function – I want to modify it a little bit, but don’t know where to look for it. In the /activity folder in the default theme theres a loop file, a single entry file etc. But activity *comments* seem to be hidden somewhere deeper.

    What I’m trying to do is wrap the content of each list item in the `div.activity-comments ul li` into a new div. I’ve done it with JavaScript (bad bad way) but it causes me issues, so I would just like to edit the file that creates the list items with activity comments.

    Anyone knows where should I look for it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • After almost 8 hours of looking into every possible theme file and googling around, I found the markup responsible for activity comments – I thought I would share the info in case someone else will be looking for it in the future.

    Turns out it’s nowhere in the theme files, but in BuddyPress files in buddypress/bp-activity/bp-activity-templatetags.php file. The function `bp_activity_comments` is defined around line 633 and it has a comment that this solution is temporary:

    `/* TODO: The HTML in this function is temporary and will be moved to the template in a future version. */`

    It can be edited there, but I’m assuming it will be possible to do this in theme files in some future version.

    Phew.


    r-a-y
    Keymaster

    @r-a-y

    You can also override the activity comments with filters as well, though you’d need to duplicate a bunch of functions to do this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where’s the markup for bp_activity_comments()?’ is closed to new replies.
Skip to toolbar