I have noticed Wordpress loves to insert <p>
tags everywhere. This can be both helpful and completely annoying...
The issue is sometimes i will catch empty <p>
tags inserted into the html, which cause a spacing issue (creating more white space on the page..)
Instead of disabling the <p>
tag styles all together. I would like to set the height of all <p>
tags to 0px
if the <p>
tag is empty (has no text inside).
Can i do this without jquery or javascript? PHP maybe?
If jquery is the only option, you may post this as the answer.
Thanks for any help!
<p>
tags won't have a height, and if you use margins for spacing paragraphs then they will collapse and not take up any space. The only time WordPress should be creating 'empty' tags, but with a space, is if you add extra lines in the editor which presumably means you intended them. When are you running into this issue?