So WordPress should embed tweets in posts just by pasting the tweet url, like so


This works great, if you manage to avoid having the url wrapped inside <p> tags.

By some secret(?) magic you can get a tweet or two to not wrap in <p> tags once in a while, but really the post editor is keen on wrapping eveything in <p> tags, no matter how hard I try to avoid it:

This is what the browser reads and the tweet fails to autoload, only the link is shown as plain text: <p>https://twitter.com/cnnbrk/status/496020289277689858</p>

This used to work great in older versions, I've been embedding twets for years now, but what has gone wrong in the latest WP versions? How do you avoid having the post editor wrap everything it sees inside <p> tags? I am not looking to remove the <p> tags altogether, just don't wan't them around the embedded links. Any ideas? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.