Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGabriel Ward
20,222 Pointsdifferent post sizes in wordpress
I want to display my images in a different size thumbnail in my single.php compared to my home.php.
Here's my code I added in functions.php
add_theme_support( 'post-thumbnails' );
add_image_size('new-thumbnail-size',600,340, true);
Here's my single.php
<?php if( get_the_post_thumbnail() ) : ?>
<div class = 'postImgCon'>
<div class="feat-img">
<?php the_post_thumbnail('new-thumbnail-size'); ?>
</div>
</div>
<?php endif; ?>
The image is not cropping or changing at all. Any help would be greatly appreciated.