• hellowoo

    (@hellowoo)


    I can easily add class of my own, but I want to add a class based on the category this obviously doesn’t work because it calls a function, not sure how to extract the variable out of it to get the post category. any ideas?

    <?php the_post_thumbnail('full', array('class' => post_class(); )); ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘add class to thumbnail based on category’ is closed to new replies.