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'm applying a new theme to my site, and the theme has a custom thumbnail size. I realize that add_image_size() does the work of creating the custom thumb whenever a new post is created.

This in my theme's functions.php:

add_image_size('ttrust_threeColumn', 280, 170, true);

However, I have a bunch of old posts I need to create this thumbnail size for. These old posts have a filename stored in a custom "Thumbnail" field, e.g.:

/wp-content/uploads/2011/11/this-is-my-post-thumb.jpg

I can grab that file path with this:

get_post_meta($post->ID, 'Thumbnail')

Now if I loop through all the old posts, how can I create the custom ttrust_threeColumn thumbnail size for each post?

I appreciate the help! I've tried a bunch of different functions and methods, but I can't seem to get a grasp on thumbnail creation for existing posts.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Banjer,

Afaik add_image_size works for new IMAGES, and not for new posts, but regardless of this I think all you need to do is regenerate your thumbnails with the must-have "regenerate thumbnails" plugin.

http://wordpress.org/extend/plugins/regenerate-thumbnails/

share|improve this answer
    
That worked, thanks. I found Ajax Thumbnail Rebuild to be a little more user friendly and better performance-wise: wordpress.org/extend/plugins/ajax-thumbnail-rebuild –  Banjer Jan 9 '12 at 14:28
    
awesome! thanks –  Talbatz Jan 10 '12 at 11:29

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.