Support ForumHow to add category name as class to recent_posts container – Support Forum https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/feed Thu, 31 Jul 2025 08:38:39 +0200 http://bbpress.org/?v=2.5.12-6148 en-US https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9205 <![CDATA[How to add category name as class to recent_posts container]]> https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9205 Thu, 23 Jul 2015 12:09:58 +0000 mewigo Hello!
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!

]]>
https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9217 <![CDATA[Reply To: How to add category name as class to recent_posts container]]> https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9217 Fri, 24 Jul 2015 06:40:51 +0000 IshYoBoy Hi Mewigo,

Sure we can help. What you need to do is override the template of the recent posts shortcode. You can do it this way:

Override shortcode template in a child theme

Then just find where the “ish-recent_posts_post” class is being output and change the code adequately.

Hope this helps.

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9224 <![CDATA[Reply To: How to add category name as class to recent_posts container]]> https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9224 Fri, 24 Jul 2015 09:27:23 +0000 mewigo Hello,
I have followed the tutorial from the link provided above. Unfortunately, the plugin’s .php is not overwritten by this.
I have placed the altered file in wp-content/themes/boldial-child/ish-plugins/ishyoboy-shortcodes/assets/backend/vc_extend/shortcodes_templates

We are using a slightly older version of your Boldial Theme (V1.5), so I hope this won’t be a problem.

]]>
https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9227 <![CDATA[Reply To: How to add category name as class to recent_posts container]]> https://support.ishyoboy.com/forums/topic/how-to-add-category-name-as-class-to-recent_posts-container/#post-9227 Fri, 24 Jul 2015 13:13:55 +0000 IshYoBoy Hey,

Well, we strongly recommend updating to the latest version. It is outdated, contains a few security issues and is not compatible with the latest WordPress versions.

Boldial WP v1.6
– New: Shortcode templates can now be overridden in “ish-plugins” folder in child theme

View The Complete Changelog here.

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>