# Open an Elementor Popup From a Link or URL Hash

> Opens an Elementor Pro popup when the address ends in #popup-123 (123 being the popup ID), so you can link to a popup from emails, menus or other pages.

- Type: HTML
- Runs: Site-wide footer
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: elementor, popups, links
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/elementor-popup-from-url-hash/

## Code

```html
<script>
(function () {
    function openFromHash() {
        var match = /^#popup-(\d+)$/.exec(window.location.hash);
        var pro = window.elementorProFrontend;
        if (!match || !pro || !pro.modules || !pro.modules.popup) { return; }
        pro.modules.popup.showPopup({ id: parseInt(match[1], 10) });
    }
    window.addEventListener('load', openFromHash);
    window.addEventListener('hashchange', openFromHash);
})();
</script>
```

## Notes

Use the popup's ID from Templates > Popups. Set the popup's display conditions to include the pages where links point.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Open an Elementor Popup From a Link or URL Hash" in its snippet library and add it in one click; or create a new HTML snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
