Changing the color of the category count

From OSClass

Changing the color of the category count in modern theme at the homepage is very easy. We are going to change the following :


We are working on the lines 55 and 59 of main.php (oc-content/themes/modern/main.php)

Line 55 (a little part of it)

<span>(<?php echo osc_category_total_items() ; ?>)</span>

Change it to

<span class="parent_cat_total_items">(<?php echo osc_category_total_items() ; ?>)</span>

Line 59

<span>(<?php echo osc_category_total_items() ; ?>)</span>

change it to

<span class="sub_cat_total_items">(<?php echo osc_category_total_items() ; ?>)</span>

Open the file (located at oc-content/themes/modern/css/style.css) Add the following lines at the end of the file:

.home #main .categories .category span.parent_cat_total_items { color:red;}
span.sub_cat_total_items { color:blue;}

Replace red and blue with the colors you want.