Add css class to wordpress thumbnails
Just in case you are working on some image effects with wordpress thumbnails and you want to be able to apply a css class to the image tag, here is what you can do.
<?php the_post_thumbnail('custom-thumbnail', array('class'=>"css-class-name")); ?>
//css style
css-class-name{
border: 1px solid #90TH76;
}
Hope you would find it useful.
Written by Stanley Ojadovwa
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#