I’m adding additional image sizes to my theme:
functions.php
add_image_size( 'my-thumbnails', 122, 122, true );
I used to get thumbnails URL like this:
wp_get_attachment_url(get_post_thumbnail_id($post->ID));
And it works like a charm, but I’m not sure how to display ‘my-thumbnails’ version of the thumbnail?
This doesn’t work:
wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),'my-thumbnails' );
What’s wrong?
You should use one of the following:
If you’re using the thumbnail as a featured image
make your own function in function.php for display your images, then call it and put the size on the parameters of the function.