Skip to content
Public Ticket #9201

Category as a class

Conversation thread

PenciDesign replied

Staff Reply

Hi,

If so, please try replace this code to:

<?php $post_class = get_post_class(); $post_classess = implode( " ", $post_class ); ?>
<div class="inner-post-entry entry-content <?php echo $post_classess; ?>" id="penci-post-entry-inner">

Best Regards,

PenciDesign

berams replied

Customer Reply

Is there any way to display the category name in the class on the single post? What I want to do is to display the image "Did you try this recipe ..." underneath (please scroll down the page to see what I mean) only if the post is the recipe.

PenciDesign replied

Staff Reply

Hi,

That's normal because that's not required for a WordPress themesmile.pngJust body class is required.

That's why you don't see it on our theme.

Best Regards,

PenciDesign

PenciDesign replied

Staff Reply

Hi,

Of course this theme already support that.

But, do you know this class just appears on category page?

Let's check on category pagesmile.png

Best Regards,

PenciDesign

berams started the conversation

Conversation Start

In my previous theme I had in the body name of the class like so <body class="category-nameofthecategory"> However this seems not to be the case with this theme? How can I get this?

Want to join this conversation or access attachments? Sign in first.