Skip to content

Instantly share code, notes, and snippets.

@wpgaurav
Last active September 21, 2022 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpgaurav/ed9e5f0979e22dc1ac2f1cfcb5d326e4 to your computer and use it in GitHub Desktop.
Save wpgaurav/ed9e5f0979e22dc1ac2f1cfcb5d326e4 to your computer and use it in GitHub Desktop.
Batch remove all featured images from your WordPress posts and pages
@wpgaurav
Copy link
Author

Place the given PHP code in between   inside your theme’s functions.php file. If there is no ending  ?> , it is recommended to place the code at the end part of the file. After you finished placing the code, save and update the functions.php file. You will see that all featured images are gone. Now you can remove the above PHP code from functions.php  as it is just a one-time job. Please note that you will not be able to set featured images until you remove the mentioned code. (This code will keep removing them.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment