Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I added the exact code that you offered in the post Show current page featured image in sidebar. The featured image is displayed, but the size of the image is unaltered from the original.

I am creating a child theme for "responsive", and this image is for a page, not a post. I used this code as the first thing in functions.php:

add_image_size( 'sidebar_post_thumbnail', 100, 9999, true );

When I insert the image as the featured image, my custom 100px size does not show up as a radio button. Also, I clicked the radio button for the default thumbnail size (150x150). That also had no effect.

Any ideas?

share|improve this question
add comment

1 Answer

The size options have no effect on the featured image, those only apply when inserting an image into post content, and furthermore, you won't see custom sizes show up there, just the default, built-in ones. The size that is output in the example you linked is controlled by the call to the_post_thumbnail( 'sidebar_post_thumbnail' );

Another thing to note is that if you've added a new image size after you've already uploaded images, those new sizes won't automatically be created. you either have to re-upload the images, or use a plugin like regenerate thumbnails.

share|improve this answer
add comment

Your Answer

 
discard

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.