.main-content p:empty { display: none; }
Is a wonderful thing for when the client is overly fond of hitting return in the editor and WP tries to help with <p></p><p></p>
.
Though, when they hit enter twice, maybe they really do want an extra space so perhaps
something like this would be a nice addition:
.main-content p:empty + p:empty { display: block; }
Of course, there are ways to filter these out entirely by filtering the_content
but those always feel a bit sketchy (“am I going to wipe out something we actually want there?”) and this sure is fast—especially if you’re using a lot of shortcodes and/or custom fields printed with wpautop
.