Function to remove p tag from wordpress editor

We need sometime to remove empty p tag which come from wordpress editor for this I have searched and getting a function which credit goes to Ryan hamilton . So I am writing this post so that it can help to other like me.

Here is the code just paste in functions.php file of your theme :

And you can use this function where you want to use.

Cheers the code !

Leave a Reply