Latest Tech and Tips

How To Bulk Remove Featured Images From Posts in WordPress

9

Recently among our visitors asked us how they can bulk remove featured images from posts in WordPress? At WPBeginner, we have actually talked about featured images (message thumbnails) sometimes. We revealed you how to include featured images in WordPress, how to include brand-new photo dimensions in WordPress, how to restore thumbnails, we also revealed you how to include numerous featured images to an articlein WordPress In this short article we will certainly reveal you how to bulk remove featured images from postsin WordPress

The Problem With Bulk Removal of Post Thumbnails or Featured Images

Unfortunately, by default you can just remove featured images by modifying each message and also getting rid of the featured photo. Now if a customer has numerous posts with featured images, after that eliminating them one at a time can be a really time consuming job. Instead, we are mosting likely to attempt a various method. We will certainly run a data source inquiry and also unset the featured images on all posts.

Before you continue, please note that the code below will certainly remove featured images from all posts on your WordPress website by merely just pasting. Also note that this code will certainly not remove any one of your uploaded images, they will certainly still be offered in Media Library and also you can recycle them anytime.

All you require to do is duplicate and also paste this code in your motif’s functions.php documents.


worldwide $wpdb;.
$ wpdb->> inquiry( ".
REMOVE FROM $wpdb->> postmeta.
WHERE meta_key='_ thumbnail_id'.
" );.

That’s all. As quickly as you conserve your functions.php documents this manuscript will certainly run a data source inquiry and also remove featured images from all posts.

Important: Please remove this code instantly after conserving your functions.php documents. You will certainly not have the ability to establish featured images in WordPress as this code will certainly maintain getting rid of featured images from posts.

We wish this short article aided you conserve time and also enabled you to bulk remove featured images from WordPress posts. For inquiries and also responses please leave a remark listed below.

Source: Kaiser

.