Site logo

Archived topic

php post_class() issue

1 reply · Started by Emanuele on September 11, 2020

Viewing posts 1–2 of 2

Hi everyone,
we have a strange problem with the string <? php post_class (); ?> and I can't understand what happened. Normally it returns all classes that belong to the post including categories and subcategories also in a custom post type we created with many taxonomies. After a further customization to filter between these posts taxonomies, the string <? Php post_class (); ?> returns only subcategories, so if a post has no subcategories then it returns nothing. What may have happened? Why does it only work partially? Is there a theme feature that expands its functionality? Thanks!

This archived topic is closed to new replies.