Saturday, November 28, 2020
Home Blogging How To Bulk Remove Featured Images From Posts in WordPress

How To Bulk Remove Featured Images From Posts in WordPress

Lately one in every of our readers requested us how they will bulk take away featured images from posts in WordPress? At gyanhigyann, we’ve mentioned featured images (submit thumbnails) many instances. We confirmed you how you can add featured images in WordPress, how you can add new picture sizes in WordPress, how you can regenerate thumbnails, we even confirmed you how you can add a number of featured images to a submit in WordPress. On this article we are going to present you how you can bulk take away featured images from posts in WordPress.

The Drawback With Bulk Elimination of Submit Thumbnails or Featured Photos

Sadly, by default you possibly can solely take away featured images by modifying every submit and eradicating the featured picture. Now if a person has a whole bunch of posts with featured images, then eradicating them one after the other is usually a very time consuming job. As an alternative, we’re going to attempt a distinct method. We are going to run a database question and unset the featured pictures on all posts.

Earlier than you proceed, please notice that the code beneath will take away featured pictures from all posts in your WordPress web site by merely simply pasting. Additionally notice that this code won’t delete any of your uploaded pictures, they may nonetheless be accessible in Media Library and you’ll reuse them anytime.

All that you must do is copy and paste this code in your theme’s capabilities.php file.

global $wpdb;
$wpdb->query( "
    DELETE FROM $wpdb->postmeta
    WHERE meta_key = '_thumbnail_id'
" );

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

Vital: Please take away this code instantly after saving your capabilities.php file. You will be unable to set featured pictures in WordPress as this code will preserve eradicating featured pictures from posts.

You May Also Like : How to Fix the Syntax Error in WordPress

We hope this text helped you save a while and allowed you to bulk take away featured pictures from WordPress posts. For questions and suggestions please go away a remark beneath.



Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Top 5 Conventional Professional Courses in India

Millions of scholars throughout India stand at crossroads of the profession upon completion of secondary and better secondary schooling. They share a standard dilemma:...

Top 25 Data Entry Jobs from Home Online/Offline: No Investment

Data Entry jobs are actually nice for individuals who need to work from dwelling however not a lot certified. Whether you're a housewife, a...

A Guide to BBA Course: Subjects, Syllabus, Colleges in India & More

Questions about larger schooling usually put college students in dilemma. Concerns over what programs to take put up larger secondary schooling are widespread amongst...

Top YouTubers in India & Most Subscribed YouTube Channels)

This digital period is a boon for the inventive individuals. In earlier years, inventive individuals, those that can dance, sing, mimic or cook dinner,...

Recent Comments