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 have the following in my functions file from the wordpress codex

<?php add_filter('show_admin_bar', '__return_false');
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 150, 150 ); // default Post Thumbnail dimensions   

if ( function_exists( 'add_image_size' ) ) { 
add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited     height)
add_image_size( 'homepage-thumb', 220, 180, true ); //(cropped)
};  ?>

And the below to call the thumbnail in my custom loop

<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'category-thumb' ); } ?>

However it doesnt seem to be resizing the thumbnails. Can anyone advise?

share|improve this question

1 Answer 1

This may be because thumbnails of all image sizes not generated,try Regenerate Thumbnails

Important Link:

How to Regenerate Thumbnails or New Image Sizes in WordPress

share|improve this answer
yea but this is a new size image, so it shouldnt matter? –  Kirsty Harris Jun 5 '13 at 10:20
I updated my answer please go threw blog post as i mention.WordPress generate all image size thumbnail when you upload image.So all image which are already in media library have not all image sizes thumbnail,to generate you have to use regenrate thumbnail plugin –  Ravs Jun 5 '13 at 10:25
@Kirsty Harris try regenrate thumbnail plugin,clear your browser cache.hope all works good. –  Ravs Jun 5 '13 at 10:30
Hi Ravs, As i said, this is not the same image, this is a new image that uploaded as the featured image, so therefore surely it should generate a new thumbnail anyways? –  Kirsty Harris Jun 5 '13 at 10:30
when you define your image size before upload image or after upload image.if you define image size after upload image it should not generate thunbnail of all image size.regenrate thumbnail plugin do not harm your media library you should give it a try.if it is not work then seem to be other problem. –  Ravs Jun 5 '13 at 10:41

Your Answer


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.