To design the output by css class is very useful.  So when you want to design wordpress post thumbnil you have to add class to the post thumbnil. So you can add class to post thumbnil as below.

the_post_thumbnail(‘post-thumbnail’, [‘class’ => ‘CLASS_NAME’]);


the_post_thumbnail( ‘thumbnail’, array( ‘class’=> ‘CLASS_NAME’) );


390 total views, 1 views today

(Visited 22 times, 1 visits today)

2 thoughts on "How to Add Class to WordPress Post Thumbnail"

  1. wewgaming says:

    Just wanna input on few general things, The website layout is perfect, the articles is very superb : D.

  2. Great, yahoo took me stright here. thanks btw for post. Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *