WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 Marks 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 – Ravinder Kumar Jun 5 '13 at 10:25
@Kirsty Harris try regenrate thumbnail plugin,clear your browser cache.hope all works good. – Ravinder Kumar 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 Marks 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. – Ravinder Kumar 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.