A custom Elementor addon is just a normal WordPress plugin that registers one or more widget classes extending Elementor's Widget_Base, hooked in through the elementor/widgets/register action. Once you understand that one sentence, the rest is structure. In this guide I'll build a working custom widget from an empty folder, using the current Elementor API — not the deprecated calls most tutorials still copy-paste.
I build these for clients when an off-the-shelf widget doesn't quite fit, or when bundling third-party addons would bloat the site. A focused, hand-built widget loads only what it needs. Here's the whole process, with real code you can run.
What is an Elementor addon, and why build your own?
An Elementor addon adds new widgets (and sometimes controls, dynamic tags, or finishers) to the Elementor editor. Popular suites like Essential Addons or Crocoblock are just large collections of these widgets in one plugin. Building your own means you ship exactly one widget instead of importing a library of 80 you'll never use.
The reasons I go custom on client work are consistent: performance (no loading scripts for widgets you don't use), a pixel-perfect component the client's brand needs, or a widget that pulls from a custom data source. If you only need a slightly different button, custom CSS is enough — but the moment you want a reusable, drag-and-drop element with its own controls, you want a real widget.
What you need before you start
This is a developer task, so a little setup goes a long way. You do not need Elementor Pro to build widgets — the free version exposes the full widget API.
- A local WordPress install (Local, DevKinsta, or wp-env) so you can break things safely.
- Elementor (free) active. Pro is optional and not required for custom widgets.
- Basic PHP and object-oriented (class) familiarity.
- A code editor and the ability to create folders in wp-content/plugins.
Step 1: Set up the plugin folder and main file
Every addon starts as a standard plugin. Create a folder and a main PHP file inside wp-content/plugins:
The main file just needs the plugin header and a bootstrap. Start with the header:
Step 2: Bootstrap safely (only run when Elementor is active)
The most common way a custom addon white-screens a site is assuming Elementor is loaded when it isn't. Always guard for it. Check on plugins_loaded, and bail with an admin notice if Elementor is missing.
Step 3: Register a custom widget category
A category is the section your widget appears under in the editor panel. It's optional, but a branded category makes your widgets easy to find. Register it on elementor/elements/categories_registered.
Step 4: Register your widget
Here's the part that trips people up. The old way — the elementor/widgets/widgets_registered hook and register_widget_type() — was deprecated in Elementor 3.5. If you copy a 2021 tutorial, your widget may throw deprecation notices or stop registering. The current API is the elementor/widgets/register action and the register() method.
Step 5: Build the widget class
This is the heart of the addon. The class extends \Elementor\Widget_Base and implements a handful of methods. Create widgets/class-heading-widget.php.
The identity methods
These tell Elementor what your widget is called, which icon to show, and where it lives.
Adding controls (the Content tab)
Controls are the fields the user edits — text inputs, color pickers, sliders, toggles. You add them inside register_controls(), grouped into sections. Each section is pinned to a tab (Content or Style).
Adding style controls (the Style tab)
Style controls write CSS directly via selectors — no PHP runs on the front end for them. The {{WRAPPER}} token is replaced with the widget's unique selector, so styles never leak. Group controls (like Typography) bundle many fields at once.
The render method
render() is what outputs the widget on the live page. Always pull values with get_settings_for_display() and escape every dynamic value. Using add_inline_editing_attributes() lets the client edit the text directly on the canvas.
That's a complete, registrable widget. Activate the plugin, open Elementor, and you'll find "My Heading" under the "My Addon" category.
Step 6: Enqueue your CSS and JavaScript
If your widget needs its own styles or scripts, register them with Elementor's enqueue hooks so they load in both the editor and the front end.
For widgets with interactive JavaScript, hook elementor/frontend/after_register_scripts to register, then call $this->get_script_depends() in the widget to load it only where used — that conditional loading is the whole performance advantage of a custom addon.
Step 7: Test it in the editor
Activate the plugin, edit any page with Elementor, search "My Heading," and drag it in. Check three things: the Content controls update the text live, the Style controls change color and typography, and the widget renders correctly on the published page (not just in the editor). Toggle responsive alignment to confirm the responsive control works per device.
Code it yourself or use an addon suite?
Hand-coding is the right call for a focused, performance-critical widget. But if you need dozens of dynamic widgets — listings, filters, forms — building them all by hand is a poor use of time. A suite gives you those ready-made.
| Approach | Best for | Trade-off |
|---|---|---|
| Custom-coded widget | One or two focused, lightweight widgets | You maintain the code |
| Addon suite (Crocoblock, etc.) | Dynamic listings, filters, many widgets fast | More weight; be selective |
| Free addon pack | Quick generic extras | Bloat and quality vary |
For dynamic, data-driven widgets without writing PHP, Crocoblock's JetEngine is what I reach for — it covers custom post types, listings and filters visually.
And if you want the full theme-builder and premium widget library alongside your custom code, Elementor Pro is the upgrade.
Best practices I follow on client addons
- Namespace everything (or prefix function and class names) so your addon never collides with another plugin.
- Escape every output (esc_html, esc_attr, esc_url) — Elementor controls are user input.
- Use {{WRAPPER}} in selectors so styles are scoped to the widget instance.
- Load assets conditionally with get_style_depends() / get_script_depends(), never globally.
- Use add_responsive_control() for anything that should change per device.
Common mistakes (and the deprecation that breaks old tutorials)
- Using the deprecated register_widget_type() / widgets_registered hook on Elementor 3.5+. Use register() on elementor/widgets/register.
- Not guarding for Elementor being inactive — a fatal error on activation.
- Forgetting get_name() must be unique across every widget on the site.
- Echoing unescaped settings in render() — a real security hole.
- Hardcoding CSS in render() instead of using selectors, which breaks the editor's live preview.
Frequently asked questions
Wrapping up
A custom Elementor addon is far less intimidating than it looks: a guarded bootstrap, a widget class extending Widget_Base, controls in register_controls(), and output in render(). Get that skeleton working once and every future widget is a variation on it. The big gotcha to remember is the registration API — use the modern register() hook and you'll skip the problem that stalls most beginners.
Want related reading on getting the most from the builder itself?
If you'd rather have a custom widget or full addon built for your brand, that's something I do for clients:

