How to give particular image size for the `_post_thumbnail()` function in wordpress?

Can anybody can tell me how to give a particular image size to a image using the_post_thumbnail()?

I have also tried add_image_size( 'image', 270, 180 ); and WordPress admin settings, but I’m not able to change the image size as I want. Is there any dynamic way to change the image size?

Related posts

Leave a Reply

2 comments

  1. You can use

          the_post_thumbnail('thumbnail'); 
          the_post_thumbnail('medium');        
          the_post_thumbnail('large');          
          the_post_thumbnail('full');           
    
          the_post_thumbnail( array(100,100) );