Guides
Adding External Scripts in Elementor

Info

Guides
May 11, 2026

Guide

There are a multiple ways to add external scripts to your project, but the methods below are usually the cleanest and most reliable for most use cases.

Option 1: Elementor Custom Code (recommended)

Go to WordPress Dashboard → Elementor → Editor → Custom Elements → Code.

Click Add New, paste your script, for example:

<script src="..."></script>

Then choose where the script should load. In most cases, use Body End.

You can also control where the script runs, such as:

  • the entire site
  • specific pages
  • certain post types
  • specific categories or taxonomies

Publish it when you are done.

This is the cleanest option because it keeps your scripts organized, reusable, and avoids adding the same script manually on multiple pages.

Option 2: HTML Widget

Edit your page in Elementor, drop in an HTML widget, and paste the script there.

This works fine for quick one-off pages or testing. But if you use the same script across multiple pages, it can get messy fast.

Use this method only when the script is needed on a specific page and you don’t want to load it globally.