voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

How to add css class to the post thumbnail image? #26

Closed hasanfardous closed 10 years ago

hasanfardous commented 10 years ago

I like so much this plugin. I'm a new user and I've a question "how to add css class to the post thumbnail image"?

chrisscott commented 10 years ago

When calling MultiPostThumbnails::the_post_thumbnail() or MultiPostThumbnails::get_post_thumbnail() the fifth argument follows the same pattern as WordPress's post thumbnail, so passing in array( 'class' => 'my-class-name') as the fifth arg would add the class my-class-name to it.