Getting StartedElementor Setup

Set Up Custom iFrame in Elementor

Step-by-step guide to set up Custom iFrame in Elementor using the Custom iFrame WordPress plugin. No coding required.

Overview

Custom iFrame lets you set up Custom iFrame in Elementor by dragging a widget onto any page and pasting a URL to embed external content. No API keys or coding needed.

Custom iFrame is a WordPress plugin by CoderzStudio that embeds 100+ external sources in Elementor and Gutenberg without writing any code.

Using Gutenberg instead? Follow the Set Up Custom iFrame in Gutenberg guide.

Requirements

  • WordPress 5.8 or higher
  • PHP 7.4 or higher
  • Elementor installed
  • Custom iFrame plugin (free version works for most features)

Step 1: Install and Activate Custom iFrame

Go to Plugins

In your WordPress dashboard, go to PluginsAdd New.

Search and install

Type Custom iFrame by Coderz Studio in the search bar. Click Install Now, then click Activate.

WordPress Plugins screen showing Custom iFrame by CoderzStudio search result with Install Now button
WordPress Plugins screen showing Custom iFrame by CoderzStudio search result with Install Now button

Once activated, the Custom iFrame widget appears in your Elementor widget panel.

Step 2: Add the Custom iFrame Widget in Elementor

Open your page in Elementor

Go to the page or post where you want to embed content. Click Edit with Elementor.

Find and drag the widget

In the Elementor left panel, search for Custom iFrame. Drag the widget into the section where you want the embed to appear.

Elementor editor showing Custom iFrame widget being dragged from the left panel into a page section
Elementor editor showing Custom iFrame widget being dragged from the left panel into a page section

Step 3: Set Up Custom iFrame in Elementor

With the widget selected, configure these Content settings:

Paste your embed URL

In the Content Source (URL) field, paste the URL of the content you want to embed. The embed loads in the editor immediately.

Set height and display options

Height: Set the iframe height in pixels (e.g., 600). For variable-length content, enable Auto Height instead.

Auto Height: Adjusts the iframe height to fit its content. Ideal for forms and documents with varying sizes.

Show Scrollbar: Enable to let users scroll inside the iframe. Disable for a cleaner look when content fits the set height.

Refresh Interval (seconds): Set a time for auto-reload. Use this for live dashboards or data feeds.

Custom iFrame widget Content tab in Elementor showing URL field, height, auto height toggle, scrollbar control, and refresh interval
Custom iFrame widget Content tab in Elementor showing URL field, height, auto height toggle, scrollbar control, and refresh interval

Step 4: Set Up Smart Load

Smart Load delays iframe loading until the embed is about to enter the visitor's viewport. This improves page load performance.

Enable Lazy Load

In the Content tab, toggle Lazy Load to Yes.

Upload a placeholder image

Upload a placeholder image. This image shows in the iframe area while the content loads, rather than a blank space.

Custom iFrame Smart Load section in Elementor showing Lazy Load toggle set to Yes and placeholder image upload area
Custom iFrame Smart Load section in Elementor showing Lazy Load toggle set to Yes and placeholder image upload area

Step 5: Enable Sandbox for Secure Embeds

Sandbox is a Pro feature. It requires Custom iFrame Pro (Starter, Studio, or Agency plan). View pricing - plans start at $29 one-time.

Sandbox mode restricts what embedded third-party content can do. When enabled, all iframe actions are blocked by default. You grant only the specific permissions your embed requires.

Toggle Enable Sandbox to Yes

In the Content tab, find the Sandbox section. Toggle Enable Sandbox to Yes.

Select permissions

Use Sandbox Options to add permissions your embed needs:

  • Allow Forms - enables form submissions
  • Allow Scripts - allows JavaScript to run
  • Allow Same Origin - needed for some services to function
  • Allow Popups - allows popups or new tabs
  • Allow Modals - enables modal dialogs
  • Allow Orientation Lock - lets the iframe lock screen orientation
  • Allow Pointer Lock - allows pointer lock (used in games or 3D apps)
  • Allow Presentation - supports presentation mode
Custom iFrame Pro Sandbox settings in Elementor showing Enable Sandbox toggle and permission checkboxes for Allow Forms, Allow Scripts, and Allow Same Origin
Custom iFrame Pro Sandbox settings in Elementor showing Enable Sandbox toggle and permission checkboxes for Allow Forms, Allow Scripts, and Allow Same Origin

Grant only the permissions your embed actually needs. Fewer permissions keeps your site more secure.

Step 6: Set Up Custom ID and Attributes

Custom ID

Assign a unique ID to the iframe for targeting with custom CSS or JavaScript. If left blank, an ID generates automatically.

Custom Attributes (Pro)

Custom Attributes is a Pro feature. It requires Custom iFrame Pro (Starter, Studio, or Agency plan). View pricing - plans start at $29 one-time.

Add custom HTML attributes to the iframe. Enter one attribute per line using key|value format.

Examples: loading|lazy, referrerpolicy|no-referrer, aria-label|Embedded Product Tour

Custom iFrame Pro settings in Elementor showing Custom ID field and Attributes input with key|value format example
Custom iFrame Pro settings in Elementor showing Custom ID field and Attributes input with key|value format example

Step 7: Style the iFrame

Open the Style tab to control the visual appearance.

Padding: Set spacing between the iframe and its container using px, em, or %. Enable Link Values to apply the same value to all four sides at once.

Alignment: Align the iframe left, center, or right within the section.

Container Width: Control iframe width using px, %, or vw.

Custom iFrame Style tab in Elementor showing padding, alignment, and container width controls
Custom iFrame Style tab in Elementor showing padding, alignment, and container width controls

Border: Set border type (Solid, Dashed, Dotted, Double, or Groove), width, color, and border radius for rounded corners.

Custom iFrame border settings in Elementor showing type, width, color, and border radius controls
Custom iFrame border settings in Elementor showing type, width, color, and border radius controls

Box Shadow: Add a shadow effect. Adjust color, horizontal and vertical offset, blur, and spread.

Custom iFrame box shadow settings in Elementor showing color picker, horizontal, vertical, blur, and spread controls
Custom iFrame box shadow settings in Elementor showing color picker, horizontal, vertical, blur, and spread controls

Click Update or Publish. Your embed is live.

Troubleshooting

Iframe shows blank: Confirm the URL is public and the source allows iframe embedding.

Content is cut off: Increase the height value or enable Auto Height.

Sandbox blocks the embed: Check what permissions the content needs and add them in Sandbox Options.

For more issues, see iFrame Not Showing.

FAQ


Also Available For