{"id":95712,"date":"2023-10-11T11:12:47","date_gmt":"2023-10-11T11:12:47","guid":{"rendered":"\/tutorials\/?p=95712"},"modified":"2025-04-23T09:25:12","modified_gmt":"2025-04-23T09:25:12","slug":"iframe-into-wordpress","status":"publish","type":"post","link":"\/in\/tutorials\/iframe-into-wordpress","title":{"rendered":"How to Embed iFrame Into WordPress Using a WordPress Block, an iFrame Plugin, and Manually"},"content":{"rendered":"<p>If you want to insert content from other sites on your WordPress website, embedding an iFrame is one of the easiest methods.<\/p><p>With an iFrame, you can display images and videos from sites like YouTube without violating copyright laws. Plus, it enables you to keep your website light and fast.<\/p><p>This article will explore three ways to embed an iFrame into WordPress. The most popular method is to embed web content using the HTML block. Alternatively, you can embed iFrames using a plugin or manually.<\/p><p>We&rsquo;ll also discuss reasons why you would want to use iFrame and how it differs from the WordPress Embed block. Let&rsquo;s get to it!<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\" target=\"_blank\" rel=\"noopener\">Download all in one WordPress cheat sheet<\/a><\/p><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-embed-iframe-into-wordpress\">How to Embed iFrame Into WordPress<\/h2><p>Here are three easy ways to embed iFrames in WordPress.<\/p><h3 class=\"wp-block-heading\" id=\"h-how-to-use-the-embed-code-and-custom-html-block\">How to Use the Embed Code and Custom HTML Block<\/h3><p>If you want to add WordPress iFrames without a plugin, the simplest approach is to use the embed code. Simply copy and paste the content&rsquo;s embed code into a WordPress using the Custom HTML block.<\/p><p>This method is best for embedding content from social sites like Facebook and YouTube. That&rsquo;s because some of these platforms restrict embedding iFrames manually.<\/p><p>Let&rsquo;s say you want to embed a YouTube video into your WordPress site. Follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Locate the <strong>Share <\/strong>button beneath the YouTube video.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image6.jpg\"><img decoding=\"async\" width=\"1024\" height=\"703\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image6-1024x703.jpg\" alt=\"You can find the embed code when you hit the Share button on Youtube.\" class=\"wp-image-95720\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image6.jpg 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image6-300x206.jpg 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image6-150x103.jpg 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image6-768x527.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"2\">\n<li>A popup will appear with the different ways you can share the video. Select the <strong>Embed <\/strong>option.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image2.jpg\"><img decoding=\"async\" width=\"1024\" height=\"481\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image2-1024x481.jpg\" alt=\"The embed code for a YouTube video on the Hostinger channel.\" class=\"wp-image-95716\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image2.jpg 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image2-300x141.jpg 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image2-150x70.jpg 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image2-768x360.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Copy the YouTube iFrame code that appears. You can also define iFrame parameters like the height and width of the content.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image7.png\"><img decoding=\"async\" width=\"1024\" height=\"364\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image7-1024x364.png\" alt=\"A YouTube embed code with iFrame parameters.\" class=\"wp-image-95721\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image7.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image7-300x107.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image7-150x53.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image7-768x273.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"4\">\n<li>Open the block editor for the post or page that you want to embed the video on your <a href=\"\/in\/tutorials\/launch-a-wordpress-site\">WordPress site<\/a>.<\/li>\n\n\n\n<li>Click on the <strong>+ <\/strong>icon to add a new block and select <strong>Custom HTML<\/strong>.<\/li>\n\n\n\n<li>Paste the iFrame code.<\/li>\n\n\n\n<li>Switch to the <strong>Preview <\/strong>tab. The iFrame should now appear.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image13.png\"><img decoding=\"async\" width=\"1024\" height=\"368\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image13-1024x368.png\" alt=\"Previewing your iFrame embed in WordPress.\" class=\"wp-image-95727\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image13.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image13-300x108.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image13-150x54.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image13-768x276.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>You&rsquo;ll use the same method to embed content from other social sites like Facebook, LinkedIn, Instagram, and Twitter.<\/p><h3 class=\"wp-block-heading\" id=\"h-how-to-embed-iframe-by-using-a-wordpress-plugin\">How to Embed iFrame by Using a WordPress Plugin<\/h3><p>If you want to add external content to your site regularly, using a plugin might be more convenient. It&rsquo;s also a great option if you&rsquo;re unfamiliar with <a href=\"\/in\/tutorials\/what-is-html\">using HTML code<\/a>.<\/p><p>There are plenty of WordPress iFrame plugins to choose from, but<a href=\"https:\/\/wordpress.org\/plugins\/advanced-iframe\/\" target=\"_blank\" rel=\"noopener\"> Advanced iFrame<\/a> is one of the best.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image3-min.png\"><img decoding=\"async\" width=\"1024\" height=\"321\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image3-min-1024x321.png\" alt=\"The Advanced iFrame plugin.\" class=\"wp-image-95729\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image3-min.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image3-min-300x94.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image3-min-150x47.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image3-min-768x241.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Advanced iFrame gives you more control over the way your iFrame looks. For instance, you can hide areas of the layout, forward parameters to the iFrame, or hide the content until it&rsquo;s fully loaded.<\/p><p>To get started, install and activate the Advanced iFrame plugin from your <a href=\"\/in\/tutorials\/wordpress\/how-to-login-to-wordpress-dashboard\">WordPress dashboard<\/a>.<\/p><p>Then, go to <strong>Advanced iFrame <\/strong>and select the <strong>Options <\/strong>tab:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image1.jpg\"><img decoding=\"async\" width=\"1024\" height=\"605\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image1-1024x605.jpg\" alt=\"The Advanced iFrame plugin options.\" class=\"wp-image-95715\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image1.jpg 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image1-300x177.jpg 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image1-150x89.jpg 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image1-768x454.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Here, you can adjust various configurations, including the display and technical options.<\/p><p>Before embedding the iFrame on your WordPress site, use the plugin&rsquo;s<a href=\"http:\/\/www.tinywebgallery.com\/blog\/advanced-iframe\/free-iframe-checker\" target=\"_blank\" rel=\"noopener\"> free iFrame checker<\/a> to see whether the URL contains any scripts that will prevent the content from loading.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image9.png\"><img decoding=\"async\" width=\"1024\" height=\"551\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image9-1024x551.png\" alt=\"The Advanced iFrame plugin's free iframe checker.\" class=\"wp-image-95723\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image9.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image9-300x161.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image9-150x81.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image9-768x413.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Once checked, return to the plugin&rsquo;s <strong>Basic Settings <\/strong>tab on your WordPress dashboard.<\/p><p>Scroll down to <strong>Url <\/strong>to add the domain. You can also define different values like the content&rsquo;s height, width, and transparency.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image4.png\"><img decoding=\"async\" width=\"1024\" height=\"601\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image4-1024x601.png\" alt=\"Basic Settings in the Advanced iFrame plugin.\" class=\"wp-image-95718\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image4.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image4-300x176.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image4-150x88.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image4-768x451.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Click <strong>Generate a shortcode for the current settings<\/strong>.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image5.png\"><img decoding=\"async\" width=\"1024\" height=\"360\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image5-1024x360.png\" alt=\"Advanced iFrame shortcode.\" class=\"wp-image-95719\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image5.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image5-300x105.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image5-150x53.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image5-768x270.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Copy the shortcode and paste it into a <strong>Shortcode <\/strong>block on any post or page via the block editor. After that, <strong>Preview<\/strong> the WordPress page on your website to make sure that the iFrame works as intended.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image12.png\"><img decoding=\"async\" width=\"1024\" height=\"538\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image12-1024x538.png\" alt=\"Preview your iFrame on the front end.\" class=\"wp-image-95726\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image12.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image12-300x158.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image12-150x79.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image12-768x404.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-how-to-use-code-to-embed-an-iframe-manually\">How to Use Code to Embed an iFrame Manually<\/h3><p>To embed an iFrame manually, you&rsquo;ll have to add the opening and closing iFrame HTML tags and the content&rsquo;s URL to your WordPress site.<\/p><p>The main benefit of this method is that you will have full control over how the iFrame will appear. You can alter the width and height of the iFrame, enable full-screen viewing, or determine when it should load.<\/p><p>Unfortunately, some social sites like Facebook and Instagram disable manual iFrame embedding. You are also limited to content from sites that use the same<a href=\"\/in\/tutorials\/http-vs-https\"> Hypertext Transfer Protocol<\/a>. In other words, if your website uses HTTPS, you can only embed content from other HTTPS sites.<\/p><p>To get started, add the iFrame code using the <strong>Custom HTML<\/strong> block on your WordPress post or page.&amp;<\/p><p>Add the opening and closing HTML tags with the content&rsquo;s URL sandwiched between them: <\/p><pre class=\"wp-block-preformatted\">&lt;iframe src=&rdquo;example.com&rdquo;&gt;&lt;\/iframe&gt;. <\/pre><p>It should look something like this:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image14.png\"><img decoding=\"async\" width=\"1024\" height=\"241\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image14-1024x241.png\" alt=\"Adding the iFrame HTML tags to a custom html block in WordPress.\" class=\"wp-image-95728\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image14.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image14-300x71.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image14-150x35.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image14-768x180.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>If you want to change the width or height, specify the exact dimensions for the iFrame after the URL. For example, let&rsquo;s set the width to 700px and the height to 900px:<\/p><pre class=\"wp-block-preformatted\">&lt;iframe src=&rdquo;example.com&rdquo; width=&rdquo;700&rdquo; height=&rdquo;900&rdquo; &gt;&lt;\/iframe&gt;.<\/pre><p>Once you&rsquo;re done customizing the iFrame, preview the result to make sure it looks good. When you&rsquo;re happy with the result, publish or update your page.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image11.png\"><img decoding=\"async\" width=\"1024\" height=\"569\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image11-1024x569.png\" alt=\"Previewing your manual iFrame embed on the front end in WordPress.\" class=\"wp-image-95725\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image11.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image11-300x167.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image11-150x83.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image11-768x427.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-why-you-should-use-iframe\">Why You Should Use iFrame<\/h2><p>An iFrame is one of the easiest ways to display external content on your own website without violating copyright laws. In other words, it&rsquo;s a legal and ethical way to share content on your website that was made by others.<\/p><p>iFrames is also useful for <a href=\"\/in\/tutorials\/how-to-embed-video-in-wordpress\/\">embedding videos<\/a> or other large files. Since you don&rsquo;t have to host the iFrame content in your <a href=\"\/in\/tutorials\/wordpress-media-library-tutorial\">Media Library<\/a>, you can save storage space on your hosting account.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/in\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner-1024x300.png\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2024\/06\/New-WP_in-text-banner-1024x300.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2024\/06\/New-WP_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2024\/06\/New-WP_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2024\/06\/New-WP_in-text-banner-768x225.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2024\/06\/New-WP_in-text-banner-1536x450.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2024\/06\/New-WP_in-text-banner.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>Therefore, using iFrames lets you keep your website light and fast, giving visitors an optimal user experience. Since website speed is a key ranking factor, this also helps your site get higher visibility on Google.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image8.png\"><img decoding=\"async\" width=\"1024\" height=\"503\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image8-1024x503.png\" alt=\"An example of an iFrame embed of a YouTube video.\" class=\"wp-image-95722\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image8.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image8-300x147.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image8-150x74.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image8-768x377.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-what-is-the-difference-between-iframe-and-embed-blocks-in-wordpress\">What Is the Difference Between iFrame and Embed Blocks In WordPress?<\/h2><p>You can share external content on your WordPress site using both iFrames and the Embed blocks, powered by the oEmbed API.<\/p><p>However, iFrame and Embed have key differences. Mainly, they are used for different types of content.<\/p><p>iFrame is best for displaying HTML documents from other sites. You can also customize the content&rsquo;s appearance.<\/p><p>Meanwhile, Embed can be used to share other content types like PDFs or Flash animations. However,<a href=\"https:\/\/wordpress.org\/documentation\/article\/embeds\" target=\"_blank\" rel=\"noopener\"> Embed blocks<\/a> only work with specific third-party sites, including YouTube, Vimeo, and Twitter. Facebook and Instagram <a href=\"https:\/\/make.wordpress.org\/core\/2020\/09\/22\/facebook-and-instagram-embeds-to-be-deprecated-october-24th\/\" target=\"_blank\" rel=\"noopener\">no longer support the oEmbed API<\/a>.<\/p><p>To use the Embed <a href=\"\/in\/tutorials\/wordpress-blocks\">WordPress block<\/a>, open the editor for a post or page from your WordPress dashboard and select the <strong>Embed <\/strong>block.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/in\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image10.png\"><img decoding=\"async\" width=\"1024\" height=\"392\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/10\/image10-1024x392.png\" alt=\"Adding the Embed block in the WordPress block editor.\" class=\"wp-image-95724\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image10.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image10-300x115.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image10-150x57.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/10\/image10-768x294.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>An iFrame is one of the easiest ways to display content from other sources on your website. For example, you can use it to share large audio and video files.<\/p><p>To recap, here are three ways to embed an iFrame into your WordPress website:<\/p><ol class=\"wp-block-list\">\n<li>Copy the embed iFrame code and paste it into the HTML block.<\/li>\n\n\n\n<li>Install a WordPress plugin, like Advanced iFrame.<\/li>\n\n\n\n<li>Edit and add the iFrame HTML code to embed it manually.<\/li>\n<\/ol><p>With iFrames, you&rsquo;re able to add content from other websites legally and ethically. Plus, you can specify its parameters so that the content appears exactly how you want it.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-embed-iframe-into-wordpress-faq\">How to Embed iFrame Into WordPress FAQ<\/h2><p>Now, you know how to embed an iFrame in your WordPress website. However, you might still have questions about the process. In this section, we will answer the most common questions about iFrames.<\/p><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1697021432082\"><h3 class=\"schema-faq-question\">What Is iFrame?<\/h3> <p class=\"schema-faq-answer\">iFrame is a common method for displaying content from external sources on your own site. You can embed an iFrame in WordPress to share content legally and ethically. Plus, since the content isn&rsquo;t hosted on your website, you can free up storage space and improve WordPress performance.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1697021444910\"><h3 class=\"schema-faq-question\">Can I Make iFrame Embedded Content Responsive?<\/h3> <p class=\"schema-faq-answer\">To make iFrames responsive and mobile-friendly, enclose the iFrame in the div container. This will allow the iFrame to automatically resize based on the screen&rsquo;s width. To do this, add the following to the HTML code: <br><br>&lt;div class=&rdquo;&rdquo;container&rdquo;&gt; &lt;\/div&gt;<br><br>You can also add CSS to the iFrame code:<br><br>.container {<br>padding-top: 56.25%;<br><br>The percentage value is useful when embedding YouTube videos to ensure full visibility.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1697021495133\"><h3 class=\"schema-faq-question\">How Do I Embed iFrame Without A Plugin?<\/h3> <p class=\"schema-faq-answer\">To use iFrames in WordPress without a plugin, you have two options. First, you can copy and paste the content&rsquo;s embed iFrame code into a Custom HTML block. Second, you can manually add the HTML iFrame tags between the source URL.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1697021508683\"><h3 class=\"schema-faq-question\">What Are the Alternatives to iFrame?<\/h3> <p class=\"schema-faq-answer\">A popular iFrame alternative is the WordPress Embed block. You can also use a plugin like<a href=\"https:\/\/smashballoon.com\/\" target=\"_blank\" rel=\"noopener\"> Smash Balloon<\/a> to display external content from social media sites.<\/p> <\/div> <\/div><p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to insert content from other sites on your WordPress website, embedding an iFrame is one of the easiest methods. With an iFrame, you can display images and videos from sites like YouTube without violating copyright laws. Plus, it enables you to keep your website light and fast. This article will explore three [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/in\/tutorials\/iframe-into-wordpress\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":76,"featured_media":95714,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"","rank_math_description":"","rank_math_focus_keyword":"","footnotes":""},"categories":[22637,22633],"tags":[],"class_list":["post-95712","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customization-and-design","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/iframe-into-wordpress","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/iframe-into-wordpress","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/95712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/users\/76"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/comments?post=95712"}],"version-history":[{"count":4,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/95712\/revisions"}],"predecessor-version":[{"id":106466,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/95712\/revisions\/106466"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media\/95714"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media?parent=95712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/categories?post=95712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/tags?post=95712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}