{"id":96401,"date":"2019-11-19T10:57:00","date_gmt":"2019-11-19T16:57:00","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=96401"},"modified":"2024-02-22T13:13:16","modified_gmt":"2024-02-22T19:13:16","slug":"resources-embedding-iframes-in-wordpress","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/","title":{"rendered":"How to Embed iFrames in WordPress"},"content":{"rendered":"\n<p>Sharing content online is a common practice. You might be stumped, however, when trying to figure out how to incorporate certain kinds of content. Sharing large files or specific items from other websites can be a challenge at times.<\/p>\n\n\n\n<p>Fortunately, there is a fairly simple web design practice you can employ to display specific types of content on your WordPress website. Using HTML to create <a href=\"https:\/\/www.w3schools.com\/tags\/tag_iframe.asp\" target=\"_blank\" rel=\"noreferrer noopener\">Inline Frames (iFrames)<\/a> can make it simpler to share images, videos, and other media online.<\/p>\n\n\n\n<p>In this article, we\u2019ll explore the different uses of iFrames on a website. We\u2019ll also go through the steps for creating iFrames, both manually and with a plugin. Let\u2019s get started!&nbsp;<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">iFrame Uses<\/h2>\n\n\n\n<p>When you use an iFrame, you essentially create a little portal on your website that enables content from somewhere else to be viewed. This can be useful in several scenarios.<\/p>\n\n\n\n<p>Using an iFrame means you don\u2019t have to actually host the files you want to display. The content stays in its original location, and can be viewed through the frame on your site. One way this technique can be helpful is when you want to display large files. An iFrame can bring that content onto your website without slowing down its loading speeds.<\/p>\n\n\n\n<p>It\u2019s worth noting that iFrames are the only kind of frame <a href=\"https:\/\/www.w3schools.com\/html\/html5_intro.asp\" target=\"_blank\" rel=\"noreferrer noopener\">allowed in HTML5<\/a>. There are a variety of different kinds of content you might use them to display, including:\u00a0<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Images:<\/strong> You can use iFrames to show high-quality images from an outside gallery, and avoid having to compromise due to file size.&nbsp;<\/li>\n\n\n\n<li><strong>Videos: <\/strong>Hosting your videos on a platform like <a href=\"https:\/\/www.youtube.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">YouTube<\/a> or <a href=\"https:\/\/vimeo.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Vimeo<\/a>, and using an iFrame to place them on your website, can enhance the user experience while freeing up your website storage space.\u00a0<\/li>\n\n\n\n<li><strong>Other web content: <\/strong>Highlighting content from other websites, such as portfolio pages or recipes, can bring rich content to your audience easily.<\/li>\n<\/ul>\n\n\n\n<p>When you use iFrames, you can also <a href=\"https:\/\/www.linkedin.com\/pulse\/can-i-embed-videos-from-other-sites-devin-miller\" target=\"_blank\" rel=\"noreferrer noopener\">avoid complicated copyright rules<\/a>. Several courts have ruled that using an iFrame to display copyrighted material does not constitute a copyright infringement in all cases.<\/p>\n\n\n\n<p>A website can also include scripts to prevent its content from being included in an iFrame. However, we recommend always crediting the original creator of any content you use, or seeking legal advice if you\u2019re unsure how to proceed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using iFrames With a Plugin<\/h2>\n\n\n\n<p>One of the easiest ways to employ iFrames on a WordPress website is to use an iFrame plugin. Fortunately, there are <a href=\"https:\/\/85ideas.com\/plugins\/best-iframe-plugins-for-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">several highly-rated options<\/a> to choose from.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Download and Configure an iFrame plugin<\/h3>\n\n\n\n<p>For our example, we\u2019re going to use the <a href=\"https:\/\/wordpress.org\/plugins\/advanced-iframe\/\" target=\"_blank\" rel=\"noreferrer noopener\">Advanced iFrame<\/a> plugin. It\u2019s flexible, simple to use, and very well-rated:\u00a0<\/p>\n\n\n\n<p>After installing and activating the plugin, you\u2019ll find a new <em>Advanced iFrames<\/em> menu item in your WordPress dashboard. Advanced iFrame has a pretty extensive set of options. You\u2019ll want to start with the <em>Options<\/em> tab, and review the \u201cQuickStart\u201d video:&nbsp;<\/p>\n\n\n\n<p>Then, you can scroll down and review some of the plugin\u2019s options. These are all set up with plenty of helpful explanations and easy-to-select choices:&nbsp;<\/p>\n\n\n\n<p>Advanced iFrames also provides <a href=\"http:\/\/www.tinywebgallery.com\/blog\/advanced-iframe\/free-iframe-checker\" target=\"_blank\" rel=\"noreferrer noopener\">a free iFrame checker<\/a>, which will check any URL you provide to see if it contains scripts that prevent the content from being included in an iFrame. It\u2019s a good idea to run any URL through this tool before using it in an iFrame on your website.\u00a0\u00a0<\/p>\n\n\n\n<p>You\u2019ll want to also review the <em>Basic Settings<\/em> tab. There, you can customize elements of the iFrame such as height, width, and frame borders:&nbsp;<\/p>\n\n\n\n<p>Once you\u2019ve configured the plugin\u2019s settings to meet your needs, you can start using iFrames on your website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Use the Advanced iFrame Block<\/h3>\n\n\n\n<p>In the WordPress Block Editor, you\u2019ll now have an <em>Advanced iFrames<\/em> block available for use:<\/p>\n\n\n\n<p>If you have trouble finding this block the first time you want to use it, it will be under the <em>Widgets<\/em> category.<\/p>\n\n\n\n<p>Once you click on the <em>Advanced iFrame<\/em> block, it will automatically load with content from the plugin creator\u2019s website. You can configure the block by using the <em>Block<\/em> options on the right-hand side of the page:&nbsp;<\/p>\n\n\n\n<p>There, you can add the URL of the content you want to appear in the iFrame. You\u2019ll also be able to override some of the plugin\u2019s settings if needed.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Preview Your Site<\/h3>\n\n\n\n<p>If you tested your URL with the <a href=\"https:\/\/www.tinywebgallery.com\/blog\/advanced-iframe\/free-iframe-checker\" target=\"_blank\" rel=\"noreferrer noopener\">iFrame checker<\/a>, you should be good to go. It\u2019s always best to preview your changes before you publish your content, however. You should see a live preview of your iFrame as you edit it and make changes.<\/p>\n\n\n\n<p>You can also use the <em>Preview<\/em> option in the upper right-hand corner of your edit window, in order to view the post in the context of your site\u2019s menus and sidebars.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using iFrames Without a Plugin<\/h2>\n\n\n\n<p>If you don\u2019t want to work with a plugin but still would like to use iFrames, you\u2019re in luck! You can manually apply code to your posts and pages to include iFramed content.&nbsp;&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Insert an Embed Code<\/h3>\n\n\n\n<p>If you want to incorporate content such as a video from YouTube on your website, you\u2019ll need to locate the embed code YouTube provides. You can find this underneath a video by clicking on <em>Share<\/em>.<\/p>\n\n\n\n<p>This will bring up a menu of sharing options. You\u2019ll want to select <em>Embed<\/em> to get the code you need for your iFrame.<\/p>\n\n\n\n<p>A separate window will open with a preview of what the embedded content will look like. You\u2019ll then be able to copy an iFrame code snippet.<\/p>\n\n\n\n<p>You can also check the <em>Start at<\/em> box if you want viewers to automatically begin viewing content at a certain time code.<\/p>\n\n\n\n<p>Next, you\u2019ll go back to your WordPress post and add the <em>Custom HTML<\/em> block. You can find this under the <em>Formatting<\/em> category.<\/p>\n\n\n\n<p>After you add this block to your post, you can simply paste in the embed code you copied from the YouTube page.<\/p>\n\n\n\n<p>Next, you\u2019ll want to make sure the embed is functioning properly and looks the way you want it to. You can click <em>Preview<\/em> in the <em>Custom HTML<\/em> block to see if your iFrame is working.<\/p>\n\n\n\n<p>With that, you\u2019ve successfully placed an iFrame on your website. The same process will work for any platform that provides you with embed codes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Customize Your iFrames<\/h3>\n\n\n\n<p>If you\u2019re still not quite happy with the way the iFrame displays on your post or page, you can manually adjust some of the values in the code. It\u2019s recommended that you use <a href=\"https:\/\/wpengine.com\/resources\/customize-theme-css\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cascading Style Sheets (CSS)<\/a> to fully customize how iFrames appear on your website.\u00a0<\/p>\n\n\n\n<p>The <a href=\"https:\/\/www.w3schools.com\/tags\/tag_iframe.asp\" target=\"_blank\" rel=\"noreferrer noopener\">iFrame tag<\/a> allows for a number of custom properties. However, it\u2019s important to note that many of these are no longer supported by HTML5. You will likely need to investigate your theme\u2019s CSS as we mentioned previously, since you may not be able to override certain formatting directly in the <em>Custom HTML<\/em> block.\u00a0\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Check Your iFrame Content Regularly<\/h3>\n\n\n\n<p>When using iFrames, you\u2019ll want to check the framed content regularly. Since you\u2019re opening up a window to content that you may not have any editorial or quality control over, it could cause a problem on your website at any time.&nbsp;<\/p>\n\n\n\n<p>For example, if the video we used in our example is taken down from its YouTube channel, our post would have a broken player in it. This is a bit more obvious than a broken link, as it will leave a visual impact on your website. Checking your iFrame content periodically enables you to change or take down any media that is no longer working.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Optimize Your Site With WP Engine<\/h2>\n\n\n\n<p>Using iFrames on your website can keep things running smoothly, while still incorporating rich media and dynamic content. Here at WP Engine, we know the importance of understanding important web design concepts and having access to the <a href=\"https:\/\/developer.wordpress.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">best developer resources<\/a> out there.\u00a0<\/p>\n\n\n\n<p>What\u2019s more, we\u2019re committed to helping you provide the best digital experiences to your customers with our premium <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a>. We have a diverse selection of fully-managed <a href=\"https:\/\/wpengine.com\/plans\/\" target=\"_blank\" rel=\"noreferrer noopener\">hosting plans<\/a>, so you can focus on designing beautiful websites!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sharing content online is a common practice. You might be stumped, however, when trying to figure out how to incorporate certain kinds of content. Sharing large files or specific items from other websites can be a challenge at times. Fortunately, there is a fairly simple web design practice you can employ to display specific types<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":177,"featured_media":149656,"template":"","resource-topic":[904],"resource-role":[895,896,906,897,903,1296],"resource-type":[916],"class_list":["post-96401","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Embed iFrames in WordPress | WP Engine\u00ae<\/title>\n<meta name=\"description\" content=\"Check out our guide to embedding iFrames on your WordPress site. With WP Engine, the process is easy and quick--discover more today!\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Embed iFrames in WordPress | WP Engine\u00ae\" \/>\n<meta property=\"og:description\" content=\"Check out our guide to embedding iFrames on your WordPress site. With WP Engine, the process is easy and quick--discover more today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-22T19:13:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2019\/11\/iframe-header.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/\",\"name\":\"How to Embed iFrames in WordPress | WP Engine\u00ae\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2019-11-19T16:57:00+00:00\",\"dateModified\":\"2024-02-22T19:13:16+00:00\",\"description\":\"Check out our guide to embedding iFrames on your WordPress site. With WP Engine, the process is easy and quick--discover more today!\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Embed iFrames in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad\",\"name\":\"Samantha Rodriguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"caption\":\"Samantha Rodriguez\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Embed iFrames in WordPress | WP Engine\u00ae","description":"Check out our guide to embedding iFrames on your WordPress site. With WP Engine, the process is easy and quick--discover more today!","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How to Embed iFrames in WordPress | WP Engine\u00ae","og_description":"Check out our guide to embedding iFrames on your WordPress site. With WP Engine, the process is easy and quick--discover more today!","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2024-02-22T19:13:16+00:00","og_image":[{"width":1100,"height":500,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2019\/11\/iframe-header.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/","name":"How to Embed iFrames in WordPress | WP Engine\u00ae","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2019-11-19T16:57:00+00:00","dateModified":"2024-02-22T19:13:16+00:00","description":"Check out our guide to embedding iFrames on your WordPress site. With WP Engine, the process is easy and quick--discover more today!","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/resources-embedding-iframes-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How to Embed iFrames in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad","name":"Samantha Rodriguez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","caption":"Samantha Rodriguez"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2019\/11\/iframe-grid.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Agency, Developer, Entrepreneur, Freelancer, Marketer, Publisher","topic":"<strong>Topics:<\/strong> Marketing","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/96401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/177"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/149656"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=96401"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=96401"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=96401"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=96401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}