• Hi, I am a newbie in this.. please help.

    I am trying to add an additional image size for a post. I am using a child theme of twentyten theme.

    In my child theme function.php, I have added these lines

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 600, 150, true );
    	add_image_size( 'category-thumb', 300, 500 );
    }

    But the new image size “category-thumb” is not showing up as an option when I am setting feature image.

    Can someone please help?? thanks!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    By default the post thumbnail will have the 600 x 150 pixel size as set in your functions.php. When adding new image sizes you will have to make changes to your (child) theme’s template files to use them. In stead of the_post_thumbnail(); you can now change it to the_post_thumbnail( 'category-thumb' ); to show the new size post thumbnail in the template files you want. These added (post thumbnail) sizes will not show by default when adding a new image.

    Thread Starter elladesign

    (@elladesign)

    Thank you for your reply. It works now.. Just for reasons I thought using “add_image_size” means that it’ll display another image size e.g. “category-thumb” in the UI.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘add_image_size doesn't work?’ is closed to new replies.