I have over 1500 posts I imported from Tumblr. While the images were imported into the gallery, I need to make sure there's a featured image for each. How do I make the images (12 per post minus 30 that don't have images) a featured image automatically?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
You can run a script that will programmatically set the featured image for each post. You can use the first attached image for this. To get the attached images run a query for the posts and loop through each one and use get_children() setting the post_parent to the current post id in your loop.
You would need to put this code somewhere it can get executed like a custom page template that you would load only one time to set the featured images. You could also use a plugin I wrote that will do this via an admin tools page via ajax. http://wordpress.org/extend/plugins/media-tools/ |
|||
