Require a featured image before you can publish post

Prem Tiwari - - WordPress Snippets


If you want to add a validation on featured image from the post add/edit screen, then keep your close attention in this tutorial as I am going to share a simple WordPress snippet to require a featured image before you can publish post.

Require a featured image before you can publish post

How to make require featured image before you can publish post

Copy the below code and use it at the end of your theme’s functions.php file. Below code will make featured image as required to Publish your post.


About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.