I have an old non-wordpress site with 25,000+ stories, that I’m converting to WordPress with Newspaper 6 theme. Everything is looking good, except one thing. (so far)
I want to automatically have a featured image on import. I understand this is the code that would be in an export:
<wp:postmeta>
<wp:meta_key><![CDATA[_thumbnail_id]]></wp:meta_key>
<wp:meta_value><![CDATA[132]]></wp:meta_value>
</wp:postmeta>
– but how can I do it when the images are initially external and I use the “Import External Images” plugin to bring them in afterwards? – Obviously, I don’t know the _thumbnail_id
Do I somehow need to import all of the images first, then export them as XML, then create a table of the IDs that I reference when creating the story XML ?
Hello,
Coding the image to be set automatically is not so easy. You would be better off to use a plugin.
Maybe you can import your posts and then use an automatic featured image plugin like: https://wordpress.org/plugins/autoset-featured-image/ I’m not sure if this particular plugin will work as we have not tested any of them, but our users seem to have used this kind of plugins successfully. What this type of plugin does is set the first image of the post as a featured image. Try a few of them out and see how they work.
I hope this helps.
Thank you!
We had similar issue and got the cheap commercial plugin on Envato “auto post thumbnail pro” — totally worked for us where we had 10 years of content but nothing in the featured image element. Soooooo much simpler than mucking with dbase. We had lots of stuff uploaded via FTP and not in media manager also, and the plugin did the deed for both. Cannot recommend more highly. (remember to add the free “thumbnail upscale” plugin also …)
Thank you Chris. I did use a plug that added the first found image as the featured image and it also allowed adding one or more images and then rotating those through posts that didn’t already have a featured image. Very flexible and 1000 times better than manually handling thousands of posts. Quick Featured Images is the one I used – and I got the Pro version.