Want to give your XenForo forum a clean, modern look? That user info area on the side of every post (often called the "postbit") is the perfect place for a small but professional upgrade.
Adding icons 🎨 for "Messages," "Location," and "Website" makes your forum look polished and easier to read. This guide will show you how to do it in two simple steps.
To add an icon, we simply insert a Font Awesome icon tag right before the text. XenForo has Font Awesome built-in, so this is super easy.
Here’s an example:
Let's say you want to add a "comment" icon next to 'Messages'. You would change this line:
...to this (notice the
You can repeat this for any line! Just find an icon you like from the Font Awesome library, get its HTML code (like
The best place for custom style changes is your
This simple CSS snippet adds
Adding icons 🎨 for "Messages," "Location," and "Website" makes your forum look polished and easier to read. This guide will show you how to do it in two simple steps.
🖌️ Step 1: Add Icons in the message_macros Template
First, we need to tell XenForo which icons to display. We'll do this by editing your theme'smessage_macros template.- Go to your XenForo Admin Control Panel (ACP).
- Navigate to
Appearance > Templates. - Search for
message_macrosand open it.
Bash:
{{ phrase('messages') }}
{{ phrase('solutions') }}
{{ phrase('reaction_score') }}
{{ phrase('points') }}
{{ phrase('age') }}
{{ phrase('location') }}
{{ phrase('website') }}
Here’s an example:
Let's say you want to add a "comment" icon next to 'Messages'. You would change this line:
{{ phrase('messages') }}...to this (notice the
<i> tag):
Bash:
<dt><i class="far fa-comment-dots"></i> {{ phrase('messages') }}</dt>
You can repeat this for any line! Just find an icon you like from the Font Awesome library, get its HTML code (like
<i class="fas fa-map-marker-alt"></i> for location), and place it before the {{ phrase('...') }} tag.💅Step 2: (Optional) Add Spacing with extra.less
After adding your icons, you might notice everything looks a little... cramped. 😥 Let's add some "breathing room" to make it look clean.The best place for custom style changes is your
extra.less template.- Go back to
Appearance > Templates. - Search for
extra.lessand open it. - Paste the following code at the very bottom of the file:
Less:
.message-userExtras {
.pairs.pairs--justified {
>dt {
padding: 5px 0;
}
}
}
5px of padding (space) above and below each item, making your new icons and text look perfectly spaced.
Last edited by a moderator: