Thumbnail issue in WordPress

I have two types of posts in the subject in which I create Trending and Normal. Thumbnail size: 300x169, and I show it as this size when the trend column is displayed. But when this post is not a trend, I want the thumbnail size to be: 145x80. I tried the_post_thumbnail( array(145,80) );, but it does not work. Instead, it acquires an image in square dimensions. I do not want it to be cropped, but reduced in size via HTML.

Can anyone help me with this.

Thank! Appreciate all the help.

+3
source share
2 answers

, , the_post_thumbnail, , . hardcrop false, .

http://codex.wordpress.org/Function_Reference/add_image_size

+4

CSS, :

<div style="width:145px;height:80px;"><?php the_post_thumbnail();?></div>

0

All Articles