web hosting
build a website

Stop WordPress creating empty < p > tags

Feb 9, 2014   //   by Anthony Devine   //   Website Development tips  //  No Comments

When you are creating a new page or post in WordPress you will find that when you use the Return button on the keyboard WordPress will automatically add in a blank < p > tag. This is not great as it adds in extra lines into the page and is not very tidy when you look at the code.

A way to stop WordPress creating blank

tags is to add the following in your functions.php file:

remove_filter ('the_content', 'wpautop');