Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Trying to add a class to the activity-header sub-section


jordashtalon
Member

@jordashtalon

Hi,

That would be a good way to do it for the name but a couple of other pieces generated by the function aren’t assigned a class, this function:

<?php bp_activity_action() ?>

outputs the following HTML:

<p>
<a title="Bill" href="http://domain.com/members/billjohnston/">Bill</a> posted on the forum topic
<a href="http://domain.com/groups/introduce-yourself-232181584/forum/topic/hi-i-am-the-safari-man/">Hi I am the Safari Man</a> in the group
<a href="http://domain.com/groups/introduce-yourself-232181584/">Introduce Yourself</a>: <span class="time-since">  1 day, 19 hours ago</span> · <a title="View Thread / Permalink" href="http://domain.com/groups/introduce-yourself-232181584/forum/topic/hi-i-am-the-safari-man/#post-6">View</a>
</p>

As you can see the name, group, forum topic, and other links like that aren’t assigned any class, how could I add classes to the output of the function?

Now that you mention it, would I should be able to style the second hyperlink ( The forum Topic ) .acivitiy-list .activity-header a:second-child is that correct?

I just wish I could make it more exact and each individual hyperlink had it’s own class.

Thanks for your help.

Skip to toolbar