WordPress strips out iframe code as a security precaution, so your best bet is installing a plugin like [iframe], which lets you embed the video using a shortcode, like so:
[iframe src=”http://player.vimeo.com/video/3261363″ width=”100%” height=”480″]
The only problem with this particular plugin is it hasn’t been updated for compatibility with WordPress 3.4.1. I’ve tested it on a couple of sites running the latest version of WordPress, and it appears to be working fine, but there’s no guarantee all will be well. I’m currently researching alternative iframe plugins that have been updated for 3.4.1 but haven’t come across one yet. I’ll post an update here if I find a better option.
—Melissa 🙂
It would probably be better if you just created your own custom page template and put the iframe within it.
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
Neither answer is correct or answers my question. To the first poster, I said that I am the administrator. WordPress DOES NOT strip out iFrame for admins, just users with lower levels. And it was working before… until Friday.
And to MickeyRoush, I just need to add YouTube and Soundcloud embeds to my posts. And I know you can just put a Youtube URL in there and it’ll automatically embed it, but not with the same customization. Your suggestion would be if it were part of the framework of my site.
So if anyone else has an answer, that would help!
Sorry that my solution doesn’t work for you. It’s what I use for my sites. I just create custom templates in my child theme and give them read only permissions. That’s the safest way to go.
But if you’re really wanted to make sure your customization sticks through edits via the dashboard then you might want to try using a plugin like this one:
http://wordpress.org/extend/plugins/raw-html/
Be weary of the way iframes work and their security implications. Make sure you use escape entities and iframe flags whenever you can/need to. There’s a reason why WordPress strips and/or converts HTML to their corresponding escape entities. If you know how to incorporate Mozilla Content Security Policy, you might want to do that as well to protect your users from any malicious iframe injections.
You may want to look through the iframe plugins. There’s quite a few of them and maybe one will support your customizations.
http://wordpress.org/extend/plugins/search.php?q=iframe
Install “Capability Manager” and enable unfiltered_html for editors. If you’re running multisite, you’ll also need Unfiltered MU.