Appearance
Hooks & Filters
Divi exposes four families of hooks, split across PHP and JavaScript layers.
The four families
| Family | Layer | Where they fire | Page |
|---|---|---|---|
| Builder PHP hooks | PHP | Around the Divi Builder lifecycle: registering modules, loading assets, rendering shortcode output. | Divi Builder PHP Hooks |
| Builder JavaScript hooks | JS (via wp.hooks) | Inside the visual builder runtime: filter CSS selectors before they're applied, modify rendered output. | Divi Builder JavaScript Hooks |
| Template hooks | PHP | Before/after Divi's frontend templates render. Hook into headers, footers, post meta, page output. | Divi Template Hooks |
| Module hooks | PHP | Around individual module rendering. Filter module attributes, output, and the rendered shortcode. | Divi Module Hooks |
Mental model
flowchart TB
subgraph PHP
A[Builder PHP Hooks] --> M[Module rendering]
T[Template Hooks] --> M
H[Module Hooks] --> M
end
subgraph JS
J[Builder JS Hooks via wp.hooks]
end
M --> Frontend
J --> VisualBuilder- PHP hooks run on the server, mostly during shortcode rendering or admin page loads.
- JavaScript hooks run in the browser, scoped to the visual builder, using the standard WordPress
wp.hooksAPI.
Hook signature pattern
Every hook page on this site follows the same structure:
- Hook name — exact string you pass to
add_filter/add_action/wp.hooks.addFilter. - Type — Action or Filter.
- Since — Divi version the hook was introduced in.
- Parameters — table of
param | type | description. - Example — minimal working snippet you can adapt.
Adding new hooks
If you're building a module and want to expose your own filters for third parties, use the standard WordPress hook API — apply_filters() in PHP and wp.hooks.applyFilters() in JavaScript. There's no Divi-specific wrapper.