Currently set to Index
Currently set to Follow

Get the Official WPSaviour App Now!

BlogTutorials

How To Bulk Remove Featured Images From Posts in WordPress

Recently definitely one in every of our readers requested us how they may bulk take away featured pictures from posts in WordPress? At WPSaviour, now we’ve got talked about featured pictures (submit thumbnails) many events. We confirmed you straightforward strategies so as to add featured images in WordPress, straightforward strategies so as to add new image sizes in WordPress, straightforward strategies to regenerate thumbnails, we even confirmed you straightforward strategies so as to add multiple featured images to a submit in WordPress. On this text we’ll current you straightforward strategies to bulk take away featured pictures from posts in WordPress.

The Disadvantage With Bulk Eradicating of Publish Thumbnails or Featured Images

Sadly, by default you might solely take away featured pictures by modifying each submit and eradicating the featured image. Now if a shopper has an entire lot of posts with featured pictures, then eradicating them one after the opposite is often a really time consuming job. Instead, we’ll try a particular methodology. We’ll run a database query and unset the featured pictures on all posts.

Sooner than you proceed, please discover that the code below will take away featured pictures from all posts in your WordPress website by merely merely pasting. Moreover discover that this code will not be going to delete any of your uploaded pictures, they’re going to nonetheless be obtainable in Media Library and you will reuse them anytime.

All it is important to do is copy and paste this code in your theme’s capabilities.php file.

1
2
3
4
5
worldwide $wpdb;
$wpdb->query( "
    DELETE FROM $wpdb->postmeta
    WHERE meta_key = '_thumbnail_id'
" );

That’s all. As rapidly as you save your capabilities.php file this script will run a database query and take away featured pictures from all posts.

Important: Please take away this code immediately after saving your capabilities.php file. You will not be capable to set featured pictures in WordPress as this code will preserve eradicating featured pictures from posts.

Download The WPSaviour App Now

Related posts
Beginner’s GuideBlogTips

Top 5 free payment gateway plugins for WordPress in India (2020)

Beginner’s GuideBlogTips

Best WooCommerce International Payment Gateways for WordPress in 2020

Best WordPress PluginsBlog

WordPress 5.4 Will Add Lazy-Loading to All Images

Beginner’s GuideBlog

How to Add a Preloader Animation to WordPress (Step by Step)

Sign up for our Newsletter and
stay informed

Leave a Reply

Your email address will not be published.