Why and How you should be using iFrames for Videos in WordPress?

Youtube, Vimeo, and others have already switched to using the iFrame version as their default method of embedding videos on the web. However for security reasons, the iFrame tag disappears in WordPress when switching from Visual Mode to HTML mode, or vice-versa. It can get very frustrating if you don’t know why this is happening. You may even publish a post only to find out that your video was never included. You might think it is a bug or an issue with your WordPress installation, but it is not. But don’t worry, we have a way for you to use iFrames for Videos in WordPress without a hassle.

One way is to remove the visual editor in WordPress, and you would never have to worry about the iFrames disappearing. However by doing so, you will lose the ability to use the internal linking feature that was added in WordPress 3.1. So this is not that good of an option.

The best option is to use a plugin called Iframe. This plugin provides an easy way to insert iFrames in your posts. .

Once you have installed and activated Iframe, you will get a new shortcode to use in your post. [iframe: ]

For example, by default Youtube’s iFrame embed code will look like this:

Tables can't be imported directly. Please insert an image of your table which can be found here.

1

With Iframe plugin, you would simply change the code to:

[iframe width=”480″ height=”390″ src=”http://www.youtube.com/embed/fUfgmRCPI0E?rel=0″ frameborder=”0″]

We recommend you start using iFrames for your videos right now and make your site accessible for mobile readers.