Embedding a Code Widget in an HTML iFrame Element

You can embed code within an HTML iframe element to address a wide range of scenarios.

If you want to embed a widget from a third party in your site, you'll need to add some code provided by the widget's creator. 

Note that widgets that need to collect information about the Wix elements on your page will not work when their code is pasted into an HTML element.

For example, Google's Website Translator is a widget that translates the contents of your page into another language. Since it needs to know about your page elements to translate them, you can't add it to your site using an HTML element and have it translate the rest of your page. You can, however, add it to an HTML element and have it translate the contents of the element itself.

Widgets that do not need to know any information about your site will usually work when their code is pasted into an HTML element.

For example, the weatherwidget.io Current Weather Widget is a widget that displays the current weather. Since it doesn't need to know anything about your page elements, you can add it to your site using an HTML element.

To add a code widget to your page:

  1. From the Embed code section of the Add menu, select an Embed code element (Wix Studio) / Embed HTML element (Wix Editor). The element is added to your page.
  2. Go to the relevant widget creator's website and collect a code snippet.
  3. In the HTML element's settings panel, select Code and paste the widget code.

See Also

Did this help?