XF 2.1 Styling user titles

sixlxvi

Active member
I searched for this but it seems to be a surprisingly uncommon topic. I’m also surprised this isn’t in default XF.

Could someone tell me, if even possible, what code would allow you to target and format individual user titles?

I just want to have their formatting look exactly how the group badges / thread prefixes do.
 

LukeWolf

Member
You can add HTML to the user title assigned via the user group settings in the Admin CP.
Just select the option for user title to override.
The member would need to be a member of the group for their user title to take effect.
This would need to be set by an administrator of course, from what I can tell there doesn't seem to be a way to style a user's user title without adding them to a user group.
 

sixlxvi

Active member
You can add HTML to the user title assigned via the user group settings in the Admin CP.
Just select the option for user title to override.
The member would need to be a member of the group for their user title to take effect.
This would need to be set by an administrator of course, from what I can tell there doesn't seem to be a way to style a user's user title without adding them to a user group.
So, to accomplish what I want, would this be the route:

Go to each title in my user title ladder and individually assign each one to automatically upgrade to a secondary user group for that title
Use HTML to override the titles of each group
Use HTML override to call CSS from extra.less or a custom template?
 

LukeWolf

Member
Go to each title in my user title ladder and individually assign each one to automatically upgrade to a secondary user group for that title
Yes.
Use HTML to override the titles of each group
Use HTML override to call CSS from extra.less or a custom template?
No. When you go to Admin CP > Groups & Permissions > User groups > userGroupName
You will see the following:
1595002369745.png

You will also see this when you create a user group so you can set this immediately.
 
Top