Jeremy Zauder
asked 6 years ago

Hi, 
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.

Jeremy Zauder
replied 6 years ago

Another way to approach this: make a single post (or category of posts) have no featured image– not globally, just a new format of post (we need instructions on how to make this), but still use a 770×400 image for the thumbnails and smaller versions around the site. In this case, we’d place our “featured image”, as whatever size we want, in the body/content area of the post. But we need a way for Focus to use a separate image for the thumbnails. Any ideas? Thank you.

1 Answers
Deborah Buck
answered 6 years ago

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') ) : ?>
<div style="height:245px;display:block;overflow:hidden;margin-bottom:20px;">
<div class="entry-thumbnail">
<?php the_post_thumbnail(''); ?>
</div>
</div>
<?php endif; ?>
Deborah Buck
replied 6 years ago

Sorry! I meant to say edit the content-single.php file.

Jeremy Zauder
replied 6 years ago

Thank you! We will try this.

Powered by DW Question & Answer Pro