I've two kinds of posts within the theme I'm creating Trending and Normal. Publish thumbnail image dimensions are: 300x169 and that i show it as being that size whenever a trending publish is displayed. However when this publish isn't trending I would like the thumbnail size to become: 145x80. I attempted
the_publish_thumbnail( array(145,80) ) however it does not work. Rather this crops the look in squarish dimensions. I'm not going it to crop but reduction in size via HTML.
Can anybody help me with this particular.
Thanks! Appreciate all of the help.
You could attempt adding a brand new image size after which whenever you call the_publish_thumbnail you pass it the title from the new image size you've set. Set the hardcrop flag to false if you do not wan't the look resizing via hard crop.
You are able to alter the size from CSS using this method:
<div style="width:145pxheight:80px"><?php the_publish_thumbnail()?></div>