[Support request] php post_class() issue

Home Forums Support [Support request] php post_class() issue

Home Forums Support php post_class() issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1438895
    Emanuele

    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!

    #1439231
    David
    Staff
    Customer Support

    Hi there,

    are these custom taxonomies ?

    If so – maybe this stack overflow is relevant:

    https://wordpress.stackexchange.com/a/109376

    GP only filters the post_class to remove the .hentry class from pages – as seen here:

    https://github.com/tomusborne/generatepress/blob/6067ee66bf7baf8a3fac45729c371e7cc5da404a/inc/markup.php#L550-L565

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.