If you want all of your post thumbnail images to be the same size throughout your theme, then you can set it infunctions.php:
set_post_thumbnail_size( 100, 100 ); // 100 pixels wide by 100 pixels tall, box resize mode
OR:
set_post_thumbnail_size( 100, 100, true ); // 100 pixels wide by 100 pixels tall, hard crop mode
However, if you want to have different image sizes for archives, custom category pages, posts, and custom post types, you can set them directly within the template tag, like so:
<?php the_post_thumbnail('thumbnail'); ?>
Copy code .post-thumbnail {
max-height: 350px;
width: 100%;
overflow: hidden;
}
.post-thumbnail img {
margin-top: 175px;
margin-left: 50%;
left: 50%;
top: 50%;
-webkit-transform: translateY(-50%) translateX(-50%);
Copy code