
Recently, I was playing with the new featured image functionality on my blog, only to find out later that all posts with a featured image were showing the image twice… Oops.
Once in the post, and above the post as the (same) featured image. Apparently my theme doesn’t handle this quite right yet, so I wanted to remove them again.
Problem is, I didn’t remember how many of my posts I had already updated. Wouldn’t it be handy if I could run a SQL statement on the WordPress database and get all those posts in a simple list?
Well, yes it would, so here’s that very statement:
select post_id from wp_postmeta where meta_key = '_thumbnail_id'
Voilà. Now you have all the IDs of your blog posts you used a featured image on. You can copy-paste this into the post edit URL and fix those posts.
The post find all wordpress posts with a featured image appeared first on n3wjack's blog.