By Design on Monday, 29 February 2016
Posted in Technical Issues
Replies 5
Likes 0
Views 802
Votes 0
Hi

How do I use Font Awesome for category icons? I didn't see anyway to assign specific classes to categories, and I tried using :nth-child(n) but that wasn't feasible for lots of categories and subcategories.

Thank you
Actually, I think I can do this using category aliases. I had been using generic category names (Category 1, Category 2, etc.) as I was testing and forgot to change the aliases when I updated the names. So I'm hopeful this will work now.

Thanks
·
Monday, 29 February 2016 06:36
·
0 Likes
·
0 Votes
·
0 Comments
·
I was wrong. Still can't figure out an adequate solution. The :nth-child(n) approach doesn't seem to work for nested categories, because when the user clicks on a parent category on the Forums page to view a category, the first subcategory is in the same position as the first parent category on the Forums page (e.g., :nth-child(1) on the Forums page selects the first parent category, but it also selects the first subcategory of the parent on the category page).

I also tried to use img[alt="CategoryName"]::before to insert Font Awesome conent, but that doesn't work on the img tag for most browsers. Unfortunately, the <a> tag that contains the category name does not contain a unique class.

Finally, I tried to insert <i class="CategoryName"></i> before my category name in the admin backend, but the html gets stripped out when I save it.

So if anyone knows of a way to use Font Awesome for category items that will work consistently across all views for categories and subcategories please let me know.

Thanks again
·
Monday, 29 February 2016 08:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
We can't support customization as it is beyond the support scope. But I will show you an example how to achieve it.
To use Font Awesome for categories you will need to apply css codes below into your template's stylesheet.

http://screencast.com/t/rycKyjCetF
·
Monday, 29 February 2016 20:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you so much! I had a chance to take a closer look at the css and I think I will be able to adapt your solution to fit my needs.

Kind regards
·
Tuesday, 01 March 2016 06:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome.
·
Tuesday, 01 March 2016 12:14
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post