Moving post images to Featured Image
-
Hi!
I have a site I inherited where all blog posts for the last few years have been created without using the Featured Image function, but instead every post starts with an image manually placed right at the top.
I would like to migrate this WordPress site, and the X Theme stack we are shooting for does all kinds of amazing things…provided the posts have Featured Images.
So I exported the XML from the existing site, and I see how each post is an XML key object called <item> and within the content key I see the post content like so:
<content:encoded><![CDATA[<img class=”aligncenter size-full wp-image-7380″ alt=”widish-gifts-to-melt-away-stress” src=”/wp-content/uploads/2014/12/widish-gifts-to-melt-away-stress.jpg” width=”634″ height=”467″ />
But if I look at an item that contains a Featured Image, the only difference I see is some kind of asset ID added to a _thumbnail_id metakey.
So, is there any automated way anyone knows of to:
Is there a way to:
1. Strip out this image at the start of posts
2. Insert it as an associated Featured Image for the same item (post)
3. Save the revised XML ready for import into the new WordPress instanceAny ideas?
Thank you!
Bill
- The topic ‘Moving post images to Featured Image’ is closed to new replies.