Auto iFrame


A quick and easy shortcode to embed iframe’s that resize to the content of the remote site.

Auto iFrame shortcode is in the format of:

[auto-iframe link=xxx tag=xxx width=xxx height=xxx autosize=yes/no]


  • link = the url of the source for the iFrame. REQUIRED.
  • tag = a unique identifier in case you want more than one iFrame on a page. Default = auto-iframe.
  • width = width of the iFrame (100% by default). Can be % or px. Default = 100%.
  • height = the initial height of the iframe (100% by default). Can be % or px. Default = 100%.
  • autosize = enable the auto sizing of the iFrame based on the content. The initial height of the iFrame will be set to “height” and then resized. Default = true.
  • fudge = a fudge factor to apply when changing the height (integer number, no “px”). Default = 50.
  • border = enable the border on the iFrame. Default = 0.
  • scroll = enable the scroll bar on the iFrame. Default = no.
  • query = pass the parent’s page query string to the iFrame. Default = no.

Note: Auto re-sizing of the iFrame for cross domain sites does not work, this is a security protection provided by the browser and there is no way around it.

Now supports (Shortcode UI)[] (aka Shortcake)!


  • Post with short code.


  1. Extract the archive file into your plugins directory in the auto-iframe folder.
  2. Activate the plugin in the Plugin options.


Installation Instructions
  1. Extract the archive file into your plugins directory in the auto-iframe folder.
  2. Activate the plugin in the Plugin options.
The autosize function doesn’t work, what’s wrong?

The first thing to check is that the source of your content is in the same domain namespace as your site, using a link from another domain name will not work as it would be a cross site scripting risk. This is part of your browsers security structure and cannot be worked around.

After that, check your browsers console for any JavaScript errors that may be happening, there may be conflicting JavaScript on the page causing an error.


Works great

I have set hundreds of iframes using this plugin and it works like a charm.

Wait…aren’t iframes dead? Not on your life, sparky.

iFrames are so 1990, or so I thought. But then my client wanted to deliver potentially HUNDREDS of their landing pages for their customers, all branded with each customer’s logo. They didn’t want just a landing page for every customer of theirs, however. They wanted CONTENT to easily be added over time too: posts; more pages; contact forms; all delivered within each customer’s custom-branded header or footer.

Yikes. We prototyped WordPress multisite but my client’s staffers wouldn’t be able to quickly make new “sites” for their customers. We examined whether we should build a site with conditionally delivered headers and footer while setting a visitor cookie to dynamically call them. Both of those options were, quite frankly, a bazooka-to-kill-an-ant and either option would have cost them a fortune in buying our time.

Then I discovered Auto iFrame.

Auto iFrame works so well that it allowed us to leverage WP Beaver Builder to make custom headers and footers as templates and deliver all content within a dynamically updating automatic iframe. Auto iFrame is automagically delivering all of that content inside of what looks like a branded subsite, all while loading and displaying that content inside a dynamically created frame that looks like a normal loading page on the site.

Plus the developer, Greg Ross, was very responsive after I asked a question and he found a bug and squashed it. I swapped out the code and everything worked perfectly.

I’m totally sold on Auto iFrame.


I thought this would be better than my current free iframe plugin, but it’s not. I see you talking about “WordPress security” for sites that aren’t a child of the domain, but every other iframe plugin doesn’t seem to have a problem with this. Thanks for wasting my time… Uninstalling worst iframe plugin

Wrong Information

I think remote site and cross domain are same. This plugin do not work for cross domain i.e. google iframes, hence wrong information included.

Read all 10 reviews

Contributors & Developers

“Auto iFrame” is open source software. The following people have contributed to this plugin.




  • Release date: March 31, 2017
  • Fixed: WP_DEBUG and JavaScript errors when the auto resize option was not used.


  • Release date: November 11, 2016
  • Added: Query support


  • Release date: September 27, 2016
  • Fixed: Fudge factor being ignored when autosizing the iframe.


  • Release date: November 6, 2015
  • Fixed: Height parameter was being ignored, thanks vantron.


  • Release date: August 11, 2015
  • Fixed: Make sure to check the frame element and sub-objects exist before using them later.


  • Release date: May 15, 2015
  • Added Shortcode UI support (see for details)


  • Release date: March 25, 2015
  • Initial release.