- I added below code in theme's function.php
add_theme_support( 'post-thumbnails' );
add_image_size( 'thumb-small', 200, 150, true );
and <?php the_post_thumbnail('thumb-small'); ?>
this in theme's file.
- I tried this also in function.php
function add_custom_sizes() {
add_image_size( 'idea-thumb', 146, 141, true ); }add_action('after_setup_theme','add_custom_sizes');
<?php the_post_thumbnail('idea-thumb'); ?>
this in theme's file.
the_post_thumbnail( array(100, 100) );
// Other resolutions
But above three condition are not working.
<?php the_post_thumbnail('thumbnail'); ?>
//this is working with 150 * 150px as default size.
what i had done mistake.
- I added below code in theme's function.php
add_theme_support( 'post-thumbnails' );
add_image_size( 'thumb-small', 200, 150, true );
and <?php the_post_thumbnail('thumb-small'); ?>
this in theme's file.
- I tried this also in function.php
function add_custom_sizes() {
add_image_size( 'idea-thumb', 146, 141, true ); }add_action('after_setup_theme','add_custom_sizes');
<?php the_post_thumbnail('idea-thumb'); ?>
this in theme's file.
the_post_thumbnail( array(100, 100) );
// Other resolutions
But above three condition are not working.
<?php the_post_thumbnail('thumbnail'); ?>
//this is working with 150 * 150px as default size.
what i had done mistake.
Share Improve this question edited Nov 8, 2014 at 9:14 Prashant Tapase asked Nov 8, 2014 at 8:22 Prashant TapasePrashant Tapase 1491 silver badge9 bronze badges 1- 2 old existing images will not resize automatically with newly defined image size. You will have to regenerate them again. Use Regenerate Thumbnails plugin to generate thumbnails of all defined sizes. – Robert hue Commented Nov 8, 2014 at 8:35
1 Answer
Reset to default 1I Used Regenerate Thumbnails plugin to generate thumbnails