- by x32x01 ||
If you want to make your XenForo sidebar look more modern and organized, adding Font Awesome icons to widget blocks is one of the easiest upgrades you can do 🎨
Icons help users quickly recognize sections like online members, forum statistics, latest posts, resources, and more. They also improve the overall user experience and give your forum a cleaner professional design.
In this guide, you’ll learn how to add icons to XenForo widget blocks using the extra.less template with simple CSS code.
Here are some benefits of using widget icons in XenForo:
Follow these steps:
Each widget gets a different Font Awesome icon.
This adds the chart icon to the Forum Statistics widget.
The value:
is the Font Awesome icon Unicode.
You can replace any icon code with another Font Awesome icon anytime.
Popular icon categories include:
Example:
You can replace it with another icon code like:
The best part is that it requires only a few lines of CSS and works directly from the extra.less template without installing extra add-ons.
Whether you run a programming forum, gaming community, cybersecurity board, or tech website, widget icons help create a cleaner and more professional experience for your visitors.
Start customizing your XenForo widgets today and make your forum stand out 🚀
Icons help users quickly recognize sections like online members, forum statistics, latest posts, resources, and more. They also improve the overall user experience and give your forum a cleaner professional design.
In this guide, you’ll learn how to add icons to XenForo widget blocks using the extra.less template with simple CSS code.
Why Add Icons to XenForo Widget Blocks?
Many XenForo forums use default widget titles without any visual styling. While that works, adding icons can make your community feel more interactive and easier to navigate.Here are some benefits of using widget icons in XenForo:
- Better sidebar appearance ✨
- Improved user experience
- Easier navigation for visitors
- More professional forum design
- Cleaner visual hierarchy
- Helps important widgets stand out
- Staff widgets
- Online users
- Forum statistics
- Resource Manager widgets
- Member widgets
- Custom widgets
Where to Add the Code in XenForo
To add icons to widget blocks, you need to edit the extra.less template inside your XenForo style properties.Follow these steps:
- Go to Admin Control Panel
- Open Appearance
- Click Templates
- Search for extra.less
- Paste the code at the bottom
- Save the template
XenForo Widget Icon CSS Code
Here’s the complete code you can use inside the extra.less template: CSS:
/** Icon Widget Toolbar @ TabCode.Net * */
.block {
h3:before {
display: inline-block;
.m-faBase();
padding-right: 3px;
}
&[data-widget-section="staffMembers"] {
h3 {
.m-faBefore("\f0e3");
}
}
&[data-widget-section="onlineNow"] {
h3 {
.m-faBefore("\f007")
}
}
&[data-widget-definition="new_profile_posts"] {
h3 {
.m-faBefore("\f086")
}
}
&[data-widget-definition="forum_statistics"] {
h3 {
.m-faBefore("\f080")
}
}
&[data-widget-definition="share_page"] {
h3 {
.m-faBefore("\f14d")
}
}
&[data-widget-definition="find_member"] {
h3 {
.m-faBefore("\f002")
}
}
&[data-widget-definition="newest_members"] {
h3 {
.m-faBefore("\f234")
}
}
&[data-widget-definition="birthdays"] {
h3 {
.m-faBefore("\f1fd")
}
}
&[data-widget-definition="xfrm_new_resources"] {
h3 {
.m-faBefore("\f187")
}
}
&[data-widget-definition="xfrm_top_resources"] {
h3 {
.m-faBefore("\f091")
}
}
&[data-widget-definition="xfrm_latest_reviews"] {
h3 {
.m-faBefore("\f005")
}
}
&[data-widget-key="xfrm_overview_top_authors"] {
h3.block-minorHeader {
.m-faBefore("\f201")
}
}
}
/** Icon Widget Toolbar @ TabCode.Net * */ Understanding How the Code Works
This code targets XenForo widget blocks using their data-widget-definition or data-widget-section attributes.Each widget gets a different Font Awesome icon.
CSS:
Example 👇
&[data-widget-definition="forum_statistics"] {
h3 {
.m-faBefore("\f080")
}
} This adds the chart icon to the Forum Statistics widget.
The value:
"\f080"is the Font Awesome icon Unicode.
Common XenForo Widget Icons
Here are some useful icon examples you can use in your forum:| Widget | Icon |
|---|---|
| Staff Members | \f0e3 |
| Online Users | \f007 |
| Forum Statistics | \f080 |
| New Profile Posts | \f086 |
| Search Members | \f002 |
| Birthdays | \f1fd |
| New Resources | \f187 |
| Top Resources | \f091 |
How to Find More Font Awesome Icons
To use different icons, visit the official Font Awesome website and copy the Unicode icon value you want.Popular icon categories include:
- Users 👥
- Charts 📊
- Comments 💬
- Security 🔐
- Downloads ⬇️
- Notifications 🔔
Example:
.m-faBefore("\f005")You can replace it with another icon code like:
.m-faBefore("\f013")Tips for Better XenForo Sidebar Design
If you really want your XenForo forum to look modern and attractive, combine widget icons with these improvements:- Use consistent colors
- Add spacing between widgets
- Customize widget headers
- Use dark mode friendly colors
- Avoid too many bright icons
- Keep the sidebar clean and readable
Final Thoughts
Adding Font Awesome icons to XenForo widget blocks is a simple customization that can completely improve your forum’s appearance 💡The best part is that it requires only a few lines of CSS and works directly from the extra.less template without installing extra add-ons.
Whether you run a programming forum, gaming community, cybersecurity board, or tech website, widget icons help create a cleaner and more professional experience for your visitors.
Start customizing your XenForo widgets today and make your forum stand out 🚀
Last edited: