How to add a symbol next to someone’s name

How can I add a symbol next to someone’s name and like if someone is in the staff group I’m trying to add a symbol next to their name just like when you are a mod you have a symbol next to your name.

Take a look at avatar flairs, I suspect that may be what you’re after.


Thank you! (20 chars)

1 Like

Do you know how to add a logo next to the name like how mods get a shield?image

Would this help?

This is what I’m looking for except I want the icon to show in post and when you go to someone’s profile also I only want an icon to show if you are in the staff group

I am trying to make it so staff don’t have to have admin or mod but have like a staff icon like a mod has a shield

We have something in our plugin-api that should be able to help: discourse/plugin-api.js at 7c7dd2335bb8590935ca6f7c19cec1f07a61412f · discourse/discourse · GitHub

Here’s an example you can put into the </head> section of your theme:

<script type="text/discourse-plugin" version="0.11">
  api.addPosterIcon((cfs, attrs) => {
    if (attrs.primary_group_name === "MY_GROUP_NAME") {
      return { icon: 'shield-alt', className: 'staff', title: 'staff' };

You will need to replace the MY_GROUP_NAME in the above code with the actual name of your group.

Would something like that work for you? I’m not sure how easy it would be to do the same on the user card/profile, but first see if the above code is what you are looking for on posts.

1 Like