First, register new image size, assuming there’s no size for that yet.
add_image_size( 'front-feature', 600, 300 );
Look in whatever front page template that is being used for your front ( it’s most likely to be index.php
), find the call to the_post_thumbnail()
inside the loop, and replace it with this.
if ( is_sticky ( $post->ID ) ) {
the_post_thumbnail('front-feature');
} else {
the_post_thumbnail();
}
Post marked as “sticky” will be using this image size, then in your style.css
make use of .sticky
to style this post’s content as you like.
Image already uploaed will not get the newly registered size, you have to either delete and re-upload or use Regenerate Thumbnail plugin to auto resize all the already uploaded ones.
Also, to avoid too many cropped images cluttering up in upload folder, just go to Settings > Media and set Medium size to 600×300 and use the_post_thumbnail('medium')
instead, no need to register new size.