# Add styles to a topic listings based on if a specific group (such as staff) has posted inside the topic

**URL:** <https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402>\
**Category:** Feature\
**Created:** [September 24, 2021, 5:41pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402 "2021-09-24T17:41:21Z")\
**Posts on this page:** 8\
**Page:** 1

## AI-generated summary

The discussion revolves around adding visual indicators to topic listings when a specific group, such as staff, posts in a topic. [Molster](/t/-/204402/1) requests a feature to flag topics where staff have replied, ideally with a class for styling, and the ability to jump to staff posts. [awesomerobot](/t/-/204402/2) recommends the [discourse-group-tracker](https://github.com/discourse/discourse-group-tracker) plugin, which adds an icon to topic lists when a tracked group posts and applies a class to individual posts. [Molster](/t/-/204402/4) successfully installs the plugin but initially struggles as the option to enable tracking is missing for default groups like staff. [awesomerobot](/t/-/204402/5) clarifies that the plugin doesn't support automatic groups, requiring a custom group to be created. [Molster](/t/-/204402/6) confirms the plugin works after creating a new group. [Molster](/t/-/204402/7) also notes that the plugin doesn't apply the class to quoted posts, though the site's own implementation (Meta) suggests it's possible. [Jagster](/t/-/204402/8) raises a concern about the utility of the feature if staff are highly active, suggesting they should use separate accounts for different roles.

<div class="post-metadata">

**Author:** ![Molster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/molster/32/199774_2.png) [@Molster](https://meta.discourse.org/u/Molster)\
**Post date:** [September 24, 2021, 5:41pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/1 "2021-09-24T17:41:21Z")

</div>

Hello, i’ve been searching for something like this by every name I could think of, and figured at this point my best bet is to ask here if there is anything like this (maybe a published theme component) and if not, add it as a feature request.

The idea is, I could flag a group (in my sake, Staff) , and any time staff post inside a topic, in the listing for that topic, id like to add a class, so that I can add maybe an icon, or a background image indicating that a staff member has replied inside the topic.

Bonus points if there was a way inside the topic to be able to jump to each staff post, but that I feel is bonus and outside a basic scope.

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [September 24, 2021, 6:08pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/2 "2021-09-24T18:08:05Z")

</div>

We have a plugin for this (though it doesn’t look like we have it documented here on Meta anywhere 🤔): [GitHub - discourse/discourse-group-tracker: Group Tracker plugin for Discourse · GitHub](https://github.com/discourse/discourse-group-tracker)

This allows you to add an icon to the topic list to mark topics where someone from a specific group has posted, and also covers this:

> [@Molster](#):
>
> Bonus points if there was a way inside the topic to be able to jump to each staff post, but that I feel is bonus and outside a basic scope.

Also, within topics… as long as the group is set as someone’s [primary group](https://meta.discourse.org/t/what-does-selecting-primary-group-for-a-user-do/25857), we add a class to each post (using Meta as an example, our team members have `group-team` added to their posts:

 ![Screen Shot 2021-09-24 at 2.02.13 PM](https://global.discourse-cdn.com/meta/original/3X/2/f/2fd850c07e05dc4f62980af176bea942c0ec5937.png)

---

<div class="post-metadata">

**Author:** ![Molster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/molster/32/199774_2.png) [@Molster](https://meta.discourse.org/u/Molster)\
**Post date:** [September 24, 2021, 6:15pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/3 "2021-09-24T18:15:02Z")

</div>

Oh that is fantastic, going to try out this plugin right now.

as for the bonus part → Yeah, im using that class right now to style the post of staff adding a gradient background image. I guess I could make a little js that auto jumps to a post based on if it has that class as well to solve it.

---

<div class="post-metadata">

**Author:** ![Molster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/molster/32/199774_2.png) [@Molster](https://meta.discourse.org/u/Molster)\
**Post date:** [September 24, 2021, 6:46pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/4 "2021-09-24T18:46:49Z")

</div>

Hey @awesomerobot

I got the plugin successfully installed (as can be seen in this screenshot)

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/5/b58aace33e1a2cb61d0497a31800f15cec3703ee.png)

However, according to the github instructions, in order to add a group

> In the “Manage” section of the group you want people to be able to track, enable the “Track posts made by members of this group” checkbox.

however, there is no such option in the manage section of a group.

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/2/62e4e1d6dca926b223319b7c803dcb8a9179bbe7.png)

currently, all topics are being flagged with the icon

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [September 24, 2021, 6:55pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/5 "2021-09-24T18:55:22Z")

</div>

hmm, If I recall correctly the plugin doesn’t work for _automatic_ groups (the ones that come with Discourse by default), which includes trust levels, moderators, and staff… so I think you have to create a new group, and on that group you should see the settings.

---

<div class="post-metadata">

**Author:** ![Molster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/molster/32/199774_2.png) [@Molster](https://meta.discourse.org/u/Molster)\
**Post date:** [September 24, 2021, 6:57pm UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/6 "2021-09-24T18:57:06Z")

</div>

Yep! you _just_ beat me to it, Made a new staff group and its working like a charm.

Thank you so much, this plugin is spot on

---

<div class="post-metadata">

**Author:** ![Molster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/molster/32/199774_2.png) [@Molster](https://meta.discourse.org/u/Molster)\
**Post date:** [September 26, 2021, 6:29am UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/7 "2021-09-26T06:29:10Z")

</div>

Noticed it looks like this does not apply the class any time a post is quoted in another topic (which means there is nothing to tag it with the same styles that it has in a topic itself [For example, changing the text color of staff posts])

If this plugin where to ever get touched again, that would be a good addition.

**Edit** : Looking at this very site (meta) the quotes actully do have a class for the group (some have no-group, team members who are quoted have group-team) so it looks like this is indeed supported?

![image](https://global.discourse-cdn.com/meta/original/3X/d/8/d8ded6be8666052bbd4caf84f9109663591fdc97.png)

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [September 26, 2021, 7:00am UTC](https://meta.discourse.org/t/add-styles-to-a-topic-listings-based-on-if-a-specific-group-such-as-staff-has-posted-inside-the-topic/204402/8 "2021-09-26T07:00:05Z")

</div>

I like that idea. But it change to useless if there is more generic topics or staff (or what that group is) are more active writers. So, they should have separate accounts depending if they are giving support (os similar where that notification is needed) than if they are participating otherwise.
