I am seeking to customize icons on a WordPress website. The site contains a variety of product categories, including subcategories.
https://i.sstatic.net/sTm1O.png
My goal is to display one icon for parent categories and a different icon for child categories. I have tried the following CSS:
.widget_product_categories ul li:before { content: "\f7ab"; }
While this code successfully changed all the icons, I am struggling to differentiate between parent and child categories. I need assistance with implementing this in CSS. Thank you for your help.
ul.product-categories {
}
.widget_archive ul, .widget_categories ul, .widget_layered_nav_filters ul, .widget_layered_nav ul, .widget_links ul, .widget_nav_menu ul, .widget_pages ul, .widget_product_categories ul, .widget_recent_comments ul, .widget_recent_entries ul {
margin: 0;
}
(widget_area .widget {
font-size: .875em;
font-weight: 400;
}
.header-widget-region, .site-content {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
body, .secondary-navigation a {
color: #0d25ad;
}
body, button, input, select, textarea {
font-family: Source Sans Pro,HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
}
body, button, input, textarea {
color: #43454b;
line-height: 1.618;
text-rendering: optimizeLegibility;
font-weight: 400;
}
body {
-ms-word-wrap: break-word;
word-wrap: break-word;
}
:root {
--wp-admin-theme-color: #007cba;
--wp-admin-theme-color-darker-10: #006ba1;
--wp-admin-theme-color-darker-20: #005a87;
<ul class="product-categories" wfd-id="31"><li class="cat-item cat-item-20 cat-parent" wfd-id="53"><a href="https://www.naturalriders.fr/categorie/le-cavalier/">Le Cavalier</a><ul class="children" wfd-id="54">
<li class="cat-item cat-item-39" wfd-id="58"><a href="https://www.naturalriders.fr/categorie/le-cavalier/accessoires/">Accessoires</a></li>
<li class="cat-item cat-item-36" wfd-id="57"><a href="https://www.naturalriders.fr/categorie/le-cavalier/bracelets/">Bracelets</a></li>
<li class="cat-item cat-item-37" wfd-id="56"><a href="https://www.naturalriders.fr/categorie/le-cavalier/ceintures/">Ceintures</a></li>
<li class="cat-item cat-item-38" wfd-id="55"><a href="https://www.naturalriders.fr/categorie/le-cavalier/tours-de-chapeaux/">Tours de chapeaux</a></li>
</ul>