WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a theme on my Wordpress install that was built for Wordpress 2.8, prior to the time that Wordpress started using featured images for posts. I am switching to a theme that was built for Wordpress 3.1 and it uses the featured image instead of looking for a custom field. I have a lot of old posts with the custom field for the image. Is there a tool I can use that takes the custom field image URL and turns it into the post's featured image? I Googled this and also searched here on Wordpress Answers to no avail. I did find a custom script on the Wordpress forums, but I didn't try it because some people had responded saying it didn't work correctly.

share|improve this question
you could always just modify the theme to look for a thumbnail first, then fall back to the custom field if it doesn't exist. – Milo May 6 '11 at 15:42
True, however there are 19 different sizes of thumbnails used by the new theme, so that would be a lot of places to update and have to use lots of sizes for TimThumb. I'm wondering about a script that can help me to not have to do that. – Industrial Themes May 6 '11 at 15:45
try using this one wordpress.org/extend/plugins/ajax-thumbnail-rebuild – Deepanshu Goel May 7 '11 at 1:55
up vote 1 down vote accepted


LIsts a plugin: http://wordpress.org/extend/plugins/get-the-image

I'm not sure by the article and description if what you are looking for is exactly what it does? It seems to imply that, but I'm not 100%

share|improve this answer
As far as I remember Get The Image is great for fetching images in different ways but it doesn't create featured images. It only can do opposite - save image found in custom field. – Rarst May 7 '11 at 10:23

create a function that loops over the posts with the old Custom field and update the post thumbnail using

`update_post_meta( $post->ID, '_thumbnail_id', $attachment_id )`
share|improve this answer

Your Answer


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.