<p> tags added via wpautop() on html output CSS solution

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: <p> tags added via wpautop() on html output CSS solution

<p> tags added via wpautop() on html output CSS solution

by axew3 » Tue Sep 15, 2026 10:17 pm

The wpautop() native WordPress function add empty <p> tags on the outputted HTML DOM in certain conditions.
So i have think that into the CSS we can just add something like this to fix the issue

Stay tuned, w3myPQ 3.1.4 is coming viewtopic.php?p=7278#p7278

Code: Select all

/* Fix the wpautop() WP function adding <p> tags on DOM problem */
#wrapw3mypq p {
    margin: 0 !important;
    padding: 0 !important;
}

#wrapw3mypq p:empty {
    display: none !important;
}

Top