set first img tag in post as the featured image
-
I am in need of a plugin or some code that will search every post/post-type and if there isn’t a featured image, take the source of the first image in the post and make that the featured image.
Now I know there are plugins like Auto Post Thumbnail, and others that will take the first image uploaded to the post and set that as the featured image. But, I am looking for the ability to simply take the first img tag and find the source of that image, then upload it to the site and set it as a featured image.
I am having to do this because I am moving lots of posts and post types from a really bloated wordpress with a corrupted database that we have concluded there is simply no easy fix. However we can export each post type one by one and in doing that we lose the links to the images in the database. Has anyone done this in the past before? And can you point me in the right direction?
- The topic ‘set first img tag in post as the featured image’ is closed to new replies.