Advanced iFrame ProSpeedup WordPressiframeDonateGitHub

WordPress iframe plugin

WordPress plugin: embed iframe into content.

Iframes are needed to embed video from youtube or to embed Google Map or just to embed content from external page.
WordPress removes iframe when you switch from "HTML" to "Visual" tab because of the security reasons.
So you can embed iframe code using this shortcode [iframe width="100%" height="480" src="http://player.vimeo.com/video/3261363"].

You also can use this shortcode to embed content via simple link: [embed_]http://www.youtube.com/watch?v=A3PDXmYoF5U[/embed] (without underscore '_')
shortcode is a WordPress core feature and based on oEmbed.


  • src - source of the iframe [iframe src="http://player.vimeo.com/video/819138"] (by default src="http://player.vimeo.com/video/819138");
  • width - width in pixels or in percents [iframe width="100%" src="http://player.vimeo.com/video/819138"] or [iframe width="640" src="http://player.vimeo.com/video/819138"] (by default width="100%");
  • height - height in pixels [iframe height="480" src="http://player.vimeo.com/video/819138"] (by default height="480");
  • scrolling - parameter [iframe scrolling="yes"] (by default scrolling="no");
  • frameborder - parameter [iframe frameborder="0"] (by default frameborder="0");
  • marginheight - parameter [iframe marginheight="0"] (removed by default);
  • marginwidth - parameter [iframe marginwidth="0"] (removed by default);
  • allowtransparency - allows to set transparency of the iframe [iframe allowtransparency="true"] (removed by default);
  • id - allows to add the id of the iframe [iframe id="my-id"] (removed by default);
  • class - allows to add the class of the iframe [iframe class="my-class"] (by default class="iframe-class");
  • style - allows to add the css styles of the iframe [iframe style="margin-left:-30px;"] (removed by default);
  • same_height_as - allows to set the height of iframe same as target element [iframe same_height_as="body"], [iframe same_height_as="div.sidebar"], [iframe same_height_as="div#content"]; (removed by default);
  • any_other_param - allows to add new parameter of the iframe [iframe any_other_param="any_value"];
  • any_other_empty_param - allows to add new empty parameter of the iframe (like "allowfullscreen" on youtube) [iframe any_other_empty_param=""];

418 comments on “iframe

  1. Hi.
    Wondering why there is a large gap after an embedded video (on mobile) in a single scrolling page. The code i used does not specify a height but Google Dev tools says there is a height of 500px on the embedded video. Any clues as to why that is?
    Thanks for your much appreciated help.

      1. Vitalii Post author

        I think that might be related to your theme. You may try to override the styles with CSS or you may contact to the theme's developers.

  2. Greetings. Trying to use the iframe plugin for amazon affiliate links on my site and it doesn't seem to be working

    [iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=tf_til&ad_type=product_link&tracking_id=growtheheckup-20&marketplace=amazon&region=US&placement=1118008189&asins=1118008189&linkId=c9750cfd0d3ccf8dd8b7d91e871fc653&show_border=false&link_opens_in_new_window=true&price_color=333333&title_color=16a085&bg_color=ffffff"]

  3. I'm trying to use the plugin, and I tried the demo shorthand code:

    [iframe src="http://www.youtube.com/embed/4qsGTXLnmKs" width="100%" height="500px"]

    But when my page loads, and I look at the the code in the Google development tools, it shows the src as undefined.

    Any idea what's going on?

    Here's the page:

    1. Does not seems like this output was made by Iframe plugin.
      Maybe you have some other iframe-like plugin installed?

Leave a Reply

Your email address will not be published. Required fields are marked *