How to Use iFrames with WordPress

WordPress doesn’t like iFrames but there is a way to get these two to play nicely together. Sometimes you need to use iFrames for an ad you are placing on your site in a widget or some code that needs to get embedded into a post.

If you just put the iFrame code in the post (always in the HTML view) and then try to view it WordPress strips the code out and it won’t work.

To get the iFrame code to work with WordPress you need to use a plug-in. There are lots of plugins you can use. I use one called simply iframe

How to Install and Use the iFrame Plugin

Installation

1. From your WordPress Dashboard, click Plugins and the Add New.

Or you can go to the WordPress Plugin page here and download it to your computer. Then go to the Plugin area on your WordPress Dashboard and upload it.

2. Once installed click Activate.

How to Use

1. Open or create a new post.

2. Paste your iframe code wherever you want it to show. (it doesn’t matter if you are in HTML or Visual view)

3. Locate < iframe portion of your code and replace it with [ iframe

4. Locate how to Embed an iframe code into wordpressand replace all of that with a ]

It would look something like this:

embedded iframe code example

That’s it. Now your iframe code will remain intact within the WordPress post or sidebar widget.


Pin Your Prize Pics on Pinterest

Comments

  1. Thank you so much for this post! I spend hours yesterday trying to understand why I was not able to embed iframe images in posts on my wordpress.org blog. Your post provides the best explanation of what the problem is – and exactly how to fix. I used the iframe plug-in and changed the iframe coding just as you suggested – and like magic my images finally appeared!

    You have a new fan 🙂

Speak Your Mind

*