WordPress always wrapping images in p tags, because images are inline elements.
Sometines this is really annoying!
Simple solution:
# Open /wp-includes/formatting.php
# edit wpautop() and insert |img| to the $allblocks variable
That’s it!
My Life 2.0
April 30, 2011 - Stefan Graf | Wordpress
WordPress always wrapping images in p tags, because images are inline elements.
Sometines this is really annoying!
Simple solution:
# Open /wp-includes/formatting.php
# edit wpautop() and insert |img| to the $allblocks variable
That’s it!
Bisher 2 Kommentare.
Let me know what you think!?
Danke! Glücklicherweise fand ich deinen Beitrag ziemlich an Anfang meiner Suche.
Schade, dass man die WordPress-Core manipulieren muss aber es ist auf die Schnelle, die beste Lösung. Die anderen Vorschläge waren, den kompletten Filter zu deaktivieren.
Freut mich, dass ich dir mit dem Beitrag helfen konnte!