How to add category name as class to recent_posts container

  • Resolved
    Posted in: Boldial WP  

  • Member
    July 23, 2015 at 2:09 pm #9205

    As we are building a global news page where multiple categories are displayed, we would also like to give them a certain “category mood” via CSS. Therefore, we would like to automatically add “the_category()” (so only the name) to the “ish-recent_posts_post” container as a class, to be able to give each category a distinct styling.

    Could you please assist in pointing to the right direction, e.g. a filter/hook or template file in order to get this to work? In the end it should look something like:
    <div id="rc-post-4307" class="ish-recent_posts_post the-category-name ish-grid12 ish-color7 ish-text-color7">

    Thank you in advance!

    Kind Regards from Germany!

    Sorry, this forum is for verified users only. Please Login / Register to continue
    or get 6 months support forum access to all forum topics for a reduced price.

Comments are closed.