custom thumbnail image size not working

Question
  1. 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.

  1. 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.

  1. 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.

0
, Prashant Tapase 7 years 2014-11-08T02:22:20-05:00 0 Answers 84 views 0

Leave an answer

Browse
Browse