I need to style a specific CATEGORY and all it’s SUB CATEGORIES and POSTS differently to the rest of the site a for a client build.
I tried this excellent code from Nick Croft [below] – which works great for CATEGORIES and POSTS – but how do I include SUB CATEGORIES also?
//adds new body class for post category
$category = get_the_category($post->ID);
$slug = $category->slug;
$classes = ‘post-category-’ . $slug;
Since you posted this a while ago, I hope you were able to get a resolution to your issue. If not, please report back here, and I will try to assist, or escalate as appropriate.
no didn’t get properly resolved as such
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.