Insert an Iframe in WordPress –

Hosting Mautic QuickStart -50% with support in Spanish
24 hours and free training

Send up to 1,000,000 emails/year. Mautic support in Spanish 24 hours, 365 days

An iframe is a special HTML tag through which can a website be displayed within an existing website.

It is possible that as part of your day-to-day implementation of websites you have some clients who have required this functionality.

If this is your case, you have put your eyes on the right article, we are going to know some of the ways that exist to insert an iframe in WordPress.

Why insert an iframe in WordPress?

You may be wondering, “in what cases do I have to insert an iframe in my WordPress web page?”. Some compelling reasons that I can list are the following:

  • You want your users to continue to see the url of your domain and load functionality from another domain.
  • Some external services only allow integrations through iframes, for example: YouTube, Google Maps, etc.
  • You can show by Iframe what will be loaded in your browser, for example a .pdf file.

In the following image we see how the site has been inserted into another site.

You just have to keep in mind that not all sites can be inserted from another domain (XFrame headers). For example, currently the Google search engine does not allow insertion of your page by iframe.

Does the use of Iframes affect SEO?

Google does not consider duplicate content if an iframe is inserted, therefore it recognizes that it is embedded content from another site.

See also  Arrows run Prestashop product images

That is, Google separates and I understand that your site and the website within the iframe are different sites and therefore treat it independently.

In conclusion, the use of iframes on your site does not affect SEO, it is indifferent, however as a recommendation you always have to place something related to your web page as an iframe, similar to how you would do with an external link.

Insert iframes through a plugin

There are some plugins that can make it easier for you to insert one website into another, for example, the Advanced iFrame plugin, this is a free plugin but with additional paid functionality.

However, for most cases the free functionality is more than enough.

After installing this plugin we will see that it has a series of settings, however, in most cases it will not be necessary to make changes to these settings.

We then leave the default settings, what interests us is the shortcode that is used to create the HTML tag of the iframe, for this we are going to go to some post or page and we will see that the plugin has created a button from where we can insert the shortcode .

In the shortcode you will see a src attribute that has a default url, just change this url.

And voila, with that you will have an iframe inserted into a WordPress page or post. To see it on the front-end of your site you have to create some menu link to that page or post.

Insert iframes manually

If you feel confident using HTML code, then you can insert the iframe manually and avoid using an additional plugin.

See also  How to Create AMP Stories for WordPress: Guide! -

To do this you have to use the WordPress editor in code view, and directly insert a code there:

Also, don’t forget to change the attribute src with the external url you want to reference. And voila, with that you will have an external website within your site.

Video

In the following video we show you how to add iframes in WordPress content through plugins and using a specific code so as not to require the use of plugins.



Conclusions

As you have seen, to insert an iframe in WordPress you can basically use a plugin or do it manually.

In most cases, I recommend doing it manually, as this way you can avoid the use of an additional plugin.

And that’s all. I hope you have enjoyed this post in which we tell you how to insert an iframe in WordPress. I hope you found it very educational, now putting it into practice is up to you. 😉

See you in the next post!

Help us improve our content by sharing your opinion

WordPress technical support at and regular speaker at Meetups and WordCamps in America.

Loading Facebook Comments ...
Loading Disqus Comments ...