iframe

Advanced Iframe ProiframeDonateGitHub

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.

Parameters:

  • 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=""];

500 thoughts on “iframe”

  1. Exactly what I needed!

    We have a digital library of old books and manuscripts. This plugin allows me to pull information about a specific item from the library.

    Thanks!

    Reply
  2. iframe doesn't work on a website. The website I'm trying keeps busting out of the frame and going full screen. How do you stop it from doing that?

    Reply
  3. The fullscreen option in the video player works with all Windows and Mac browsers I've tested EXCEPT for Safari for Mac (currently using v 8.0.2). Clicking the fullscreen icon only results in a slight increase in the width of the player window.

    Reply
  4. Hello,

    Thanks for your plugin, it is all working well apart from one thing. I have used iframe to import information from my Rootsmagic site and this is displayed on one of the pages (Family Tree and individuals), but if there are a large number of individuals using one of the surnames eg Porter in P, the page is not large enough to display all the entries. I'd appreciate any advise on how to enlarge the panel or set up a second page?

    Reply
  5. hi

    i would like to ask in my website i used iframe for my book engine

    and i need redirect for paypal but i could not .

    on the plugin

    i can do it ?

    http://www.istanbulshuttleservices.com/book-airport-shuttle/from-hotel-to-sabiha-gokcen-airport/ in here you can see this too

    last step it should redirect to paypal but not work

    you can see how to redirect to paypal in here https://www-21i.bookeo.com/bookeo/b_tourismopolitan_start.html?type=221NJW7HY1479D83E8DF&ncs=knwwrhmhmf

    but i could not do in my website

    can you help me please ?

    Reply
    • Advice: do not use IE and use some modern browser.

      Iframe plugin works correctly in every browser.
      The site, which you shared does not support IE.

      Reply
  6. is possible to add captions (srt file) ?

    something like

    [iframe src="" caption="example.com/captions/123.srt"]

    Reply
  7. Trying to use an iframe like a video player window of sorts for adobe connect video (internal site so can't give live example, sorry). I got the initial iframe on the page working no problem:

    [iframe id="player" src="https://video.link" width="100%" height="600px" scrolling="no"]

    However when I try to point other video links to the iframe, they open in a new tab instead:

    Thoughts? Thanks in advance.

    Reply
    • Shortcode works if content is parsed thru do_shortcode function.
      If page template was not properly build than it could be the explanation of the problem.

      Reply
  8. I used the iframe (plug-in) code in the description area of "categories". It worked nicely. Once I assigned a category to each post, the iframe content related to that category displayed tips at the end of each post. Since the upgrade to the latest WordPress, that function has gone away (the iframe code will not work in the category description field). Any guidance? Thanks.

    Reply
    • I just want to follow-up to my earlier post. I am running a test BLOG that has not been upgraded to the latest version of WordPress. I am using the Iframe plugin. The embedded iFrame is displaying correctly. The source code is as follows. But the following code does not appear is the updated WordPress with the IFrame plugin operating:

      Reply
      • If iframe shortcode worked in the categories description and now in newer version it does not so the developers changed something in the core.

        I would recommend you to search some plugin which will help you to execute shortcodes in category descriptions.

        Reply
  9. Same issue, the height isn't working for small iframes e.g. [iframe scrolling="no" frameborder="0" width="227" height="75" marginheight="0" src="http://www.clocklink.com/html5embed.php?clock=008&timezone=UnitedKingdom_Belfast&color=black&size=227"] still gives a larger height

    Reply
        • There is a css called fluid-width-video-wrapper that seems to be setting up a 218px high wrapper when all I need is 75px for the iframe above. It must be a theme issue then?? I am using Pinboard theme with WordPress 3.6

          Reply
  10. Since the Update for WordPress to 3.6 the paramater for same_height_as="content" isnĀ“t working anymore. I just see the default height for the frame (480px)

    Any Ideas how to fix the issue?

    Thanks in advance :)

    Reply

Leave a Comment