Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using the following code:

<?php if (the_post_thumbnail()) : ?>
    <div class="thumbnail">
    <?php the_post_thumbnail('thumbnail'); ?>
    </div>
<?php endif; ?>

But the thumbnail is appearing full size. Same applies if I use (array(200,150)). My "Media" settings are set correctly (thumbnails at 288 max width, 500 max height); I've checked the uploads directory to see if the images have been resized and they have.

Any ideas?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Updated the answer to match my latest comment:

Changing <?php if (the_post_thumbnail()): ?> to <?php if (has_post_thumbnail()): ?> will probably solve things.

Also, some must have developer plugins when working with featured images:

share|improve this answer
    
Thanks mate. I installed the AJAX version instead in case I have to do this in future (we'll have 12,000+ images) but to no avail - same problem. –  dunc Jan 14 '12 at 13:51
2  
Sorry, I've misread the last bit of your question. Changing <?php if (the_post_thumbnail()): ?> to <?php if (has_post_thumbnail()): ?> will probably solve things. –  Cor van Noorloos Jan 14 '12 at 14:13
    
Perfect! :) I'll accept your original answer, feel free to edit it to incorporate your latest comment. –  dunc Jan 14 '12 at 14:20
    
Thanks :) I've updated the original answer. –  Cor van Noorloos Jan 14 '12 at 14:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.