HI,
in my site I have the need of style with different colors each category posts. your theme doesn’t allow it, so I ask you some hint in order to achieve it. in homepage (I’ve used TAGDiv composer) I want that every block that include title and meta of the post, could have a custom class named like the parent category of the post displayed. how could I do this?
it is important because all my site is based on that
thank’s in advance,
m
Hi,
Unfortunately, the theme does not have any such an option that allows you to achieve this, sorry! Regarding different colors, you should try using the Cloud Template and create your own Category with TD Composer and use any colors you want.
Thanks for your understanding!
thank’s but if I do so, every category will have the same color. My need is to modify the php template in order to automatically add the same name of the cat as class, and this for each category tag shown above the title of the post in the big grid flex module. because this isn’t an option available in backend, I need to modify the theme. I’ve tried this script:
<?php if ($category_position == ‘above’) { echo ‘<div class=”‘ . get_cat_name( $cat_id ) . ‘”>’ . $this->get_category() . ‘</div>’; }?>
but it doesn’t work. thank’s for the support.
m
Hi,
Unfortunately I do not know how to implemented this in theme files, but if you want you can use a custom css that do the same thing.
You can try this custom css for color on individual categories -> https://www.screencast.com/t/1ilmCmyTZhh
.td-module-image a[href$="/video/"]{
background-color: green;
}
All you need to do is to change the category in code and the background color will apply on that category.
Thank you!