We upload 770×400 images for the featured images on posts. All the thumbnails and small sizes work fine like that. But we’d like to have a single post (or every post in a single category) display the featured image on top of that post as 770×200 (full width but only 200 pixels tall; so we crop the image in half). And the rest of the thumbnails and smaller sizes (for homepage, category page, etc) should remain the same default sizes (and aspect ratios) as if the image was 770×400, even if they are based on a Featured Image that is cropped to 770×200 on that page. Is this possible? Thanks. Let me know if I’m not explaining fully.
I finally landed on a solution to this problem. It may not be the best, but it works pretty well. You just need to make sure your feature image is designed to look good chopped in half (only displaying the top half). Edit the content.php file to add in an extra div wrapper:
<?php if( has_post_thumbnail() && ! has_post_format('video') && ! has_post_format('audio') && ! has_post_format('gallery') ) : ?>
<?php the_post_thumbnail(''); ?>
<?php endif; ?>
Please login or Register to submit your answer