iframes within post content ( the_content).Impact on oEmbed contentīy default, WordPress will add a loading="lazy" attribute to the following iframes: See also #50756 for the ticket ticket Created for both bug reports and feature development on the bug tracker. Since the considerations of lazy-loading iframes are similar to those of lazy-loading images, please refer to the original image lazy-loading announcement post as well as this article on browser-level lazy-loading for background information on the topic. The attribute is added on page output using the wp_filter_content_tags() function which was introduced in WordPress 5.5 with specifically that extensibility in mind which now allows reusing it for this new performance feature. Similar to how it affects images, WordPress will add loading="lazy" to only those iframe tags that have both width and height attributes present, to avoid any perceived negative impact on layout shifting. This will bring to iframes the same performance benefits which WordPress 5.5 introduced by lazy-loading images. Reason: XSS vulnerability (thanks to dxw.com).In WordPress 5.7, iframes will be lazy-loaded by default, using the browser-level loading attribute. If you still need this feature you can [download iframe ver 3.0[() and stick to it but keep in mind of XSS vulnerability. Reason: XSS vulnerability (thanks to dxw.com). removed onpageshow and onclick params.removed onmouseover and onfocus attributes.Examples: onload, onmouseover, onfocus, onpageshow, onclick. remove all attributes starting with “on”.any_other_empty_param – allows to add new empty parameter of the iframe (like “allowfullscreen” on youtube).any_other_param – allows to add new parameter of the iframe.same_height_as – allows to set the height of iframe same as target element:, ,, removed by default.style – allows to add the css styles of the iframe: removed by default.class – allows to add the class of the iframe: by default class=”iframe-class”.id – allows to add the id of the iframe: removed by default.allowtransparency – allows to set transparency of the iframe: removed by default.marginwidth – width of the margin: removed by default.marginheight – height of the margin: removed by default.
![HTML iframe code wordpress HTML iframe code wordpress](https://4.bp.blogspot.com/-88Y6Zju7MRk/VrmhkFexr-I/AAAAAAAABgU/mv4qzxwLrkI/s1600/adding-iframe-tiki-6-page-saved.gif)
frameborder – with or without the frame border: by default frameborder=”0″.scrolling – with or without the scrollbar: by default scrolling=”yes”.height – height in pixels: by default height=”500″.
![HTML iframe code wordpress HTML iframe code wordpress](https://www.wpbeginner.com/wp-content/uploads/2020/12/youtube-iframe-code-in-html-block.png)
width – width in pixels or in percents: or by default width=”100%”.src – source of the iframe: by default src=””.So the protocol (http or httpS) for parent and embedded page should match.
![HTML iframe code wordpress HTML iframe code wordpress](https://codedec.com/wp-content/uploads/2020/08/Screenshot-from-2020-08-29-13-14-35.png)
Important: You can not embed HTTP pages into HTTPS pages and vice versa. shortcode is a core WordPress feature and can embed content from many resources via direct link. If you need to embed content from YouTube, Vimeo, SlideShare, SoundCloud, Twitter via direct link, you may use shortcode. You may use iframe shortcode to embed content from YouTube, Vimeo, Google Maps or from any external page. Iframe shortcode is the replacement of the iframe html tag and accepts the same params as iframe html tag does. WordPress removes iframe html tags because of security reasons.