php shell hacklink php shell seobizde.com hacklink izmir escort sultangazi escort alanya escort gabile

How To Remove Featured Images Globally From Posts in WordPress – TutsFx

How To Remove Featured Images Globally From Posts in WordPress

t

Remove Featured Images Globally From Posts – Just one of our readers requested us how they can be unpackaged remove featured images from posts in WordPress? At TutsFx, we have conferred featured images (post thumbnails) several times. We displayed you how to add featured images in WordPress, how to add new image dimensions in WordPress, how to regenerate thumbnails, we even showed you how to add several featured images to a post in WordPress. In this article, we will show you how to remove featured images globally from posts in WordPress.

The Issue With Bulk Removal of Post Thumbnails or Featured Images in WordPress

Unfortunately, by default, you can only remove featured images by editing separately post and removing the featured image. Now if a user has hundreds plus of posts with featured images, then removing them 1 by 1 can be a very time-consuming job. Instead, we are going to try a different approach. We will run a database query and unset the featured images on all posts.

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

All you need to do is copy and paste this code in your theme’s <span style="font-size: 10.0pt; color: #464646;">functions.php</span> file.

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

That’s all. As soon as you save your functions.php file this script will run a database query and remove featured images from all posts.

Important: Please remove this code immediately after saving your functions.php file. You will not be able to set featured images in WordPress as this code will keep removing featured images from posts.


Response (246)
  1. B
    Bradly July 13, 2021

    I read this post fully on the topic of the
    difference of hottest and preceding technologies, it’s amazing article.

  2. M
    Melvina July 16, 2021

    Very nice blog post. I definitely appreciate this website.

    Keep it up!

  3. h
    https://Shqiponja.al July 17, 2021

    After looking att a numƄer of the blоg posts on ʏоur website,I honestly like your way of writing a
    blog. I savedd it to my bookmark site list and will be checking back soon. Take a look at my web siote too and let me know what you think.

  4. b
    bernie sanders hair t shirt July 17, 2021

    Hey There. I found yoᥙr blog using msn. This iss an extremelʏ well written articⅼe.
    I’ll make sure to bookmark it andd return to read more of your useful info.

    Thanks ffor thhe post. I’ll certainly return.

Leave a comment
Your email address will not be published. Required fields are marked *

Linux Tutorials
t
tutsfx
How to convert from CentOS 8 to AlmaLinux 8
September 15, 2021
Save
How to convert from CentOS 8 to AlmaLinux 8
t
tutsfx
Installing PHP Module for Apache on Ubuntu 20.04
June 20, 2021
Save
Installing PHP Module for Apache on Ubuntu 20.04
t
tutsfx
How to Install PHP 8 on CentOS 8 Linux system
March 3, 2021
Save
How to Install PHP 8 on CentOS 8 Linux system