• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Font Awesome Unicode After Usernames for Certain Groups?

Hi there. I'm trying to figure out how I could do this - I'm wanting to place Font Awesome icons after a username; but only if they're a member of a certain group.

I had it working by placing this in the extra.css:

a.username:after {
    font-family: FontAwesome;
    font-size: 12px;
    content: '\f132';
    font-weight: normal;
    padding-left: 3px;
However, obviously, that makes it show for everybody. I'm a little unsure of how to call it for only a certain group. I'm assuming I'll have to add different bits in EXTRA.css for each usergroup (much like it's done for user banners) but I can't figure it out. I'm by no means amazing with CSS.

This is how the code above shows:

Now I just need to figure out how I can make it so it's only called for certain usergroups, and where to call it.


Sage Knight

Well-known member
Here's what I would do:

.username .styleXX {

Where XX is the usergroup ID for the group, in your case just add it as such

.username .styleXX:after {