When using iFrames be sure to acknowledge that the content is from another site and credit the original author when appropriate. Using iFrames is common practice but attempting to mask them as your own content is frowned upon.

This plugin and the following instructions come from http://phat-reaction.com/wordpress-plugins/easy-iframe-loader/

We shortened the post and did a slight edit to resolve an issue with “quotation marks” used in the shortcodes. Copying code with quotation marks often causes problems because of the way browsers and Microsoft Word generate quotation marks. When in doubt, or when you see something not working when you think it should, use the WordPress Text editor option (the tabs in upper right of the edit box) or a desktop editor like notepad++ (highly recommended and free)

Easy iFrame Loader is a Simple plugin that (at this time) uses a shortcode to late load iFrames using javascript. This gets over 2 separate problems.

1. loading of iframe does not happen until after the complete page has loaded by using the window.onload command, thus making page loading quicker when an iFrame is used directly in the HTML as an iFrames want to load first stopping the rest of the page loading.

2. gets over the automatic deletion of iFrame info from the editor when the user changes between Visual and HTML mode.

3. makes it easy for administrators to pre-determine the size of different iframes from the admin screen

How to use it

The shortcode has many different options to allow for complete control of the iFrame, taking in to account the need to have click text also. The shortcode details are listed below, there is another page with information on the template tags that are available

Defaults for the Shortcode

 [iframe_loader width="100%" height="150" frameborder="0" longdesc=" " marginheight="0" marginwidth="0" name=" " click_words=" " click_url=" " scrolling="auto" src=" "]


item Options description Default compulsory
width px or % Can be set as a percentage i.e 100% or as a px value, the px is not needed at the end of the number i.e. 300 100% yes
height px Can be set as a px value only, the px is not needed at the end of the number i.e. 250 150 yes
frameborder 0 = no
1 = yes
Puts a border around the iframe, mostly unwanted 0 no
longdesc URL A link to the a URL where there is more information about the iFrame, mostly used for blind people no set no
marginheight number value adds a margin above and below the iframe 0 no
marginwidth number value adds a margin to the left and right of the iframe 0 no
scrolling yes
Controls the scrolling when the iframe content is larger than the iframe area auto no
name a name Sets a name for the iFrame so that it can be controled by Javascript later no
src URL The URL of the iFrame yes
click_words Sentence The words that go just below the iframe that are clickable to allow a user to perform different activites. Like open a larger Map when using google maps. *must be used in conjunciton with click_url or nothing will show no
click_url url The URL of what you would like the click_words to go to. Like opening a larger Map when using google maps. *must be used in conjunciton with click_words or nothing will show no


Related Tip:

Display Code in Posts