Hook
Run the functions attached to a WordPress action hook at this spot.
The Hook block fires a WordPress action hook at the exact point in a template where you place it, running whatever functions a plugin or your theme has attached to that hook. Reach for it when something needs to render at a precise spot without hard-coding output, a WooCommerce widget, a third-party integration, or any custom function wired to a named action.
Adding one
- Select the section or container where the output should appear.
- Open the inserter and search "hook".
- Pick the Hook block, then set the hook name in its panel.
Settings
In the hook's own panel.
| Setting | What it does | Reach for it when |
|---|---|---|
| Hook | Preset list of common WordPress and WooCommerce action hooks | The hook you need is a well-known one, such as a WooCommerce product hook |
| Custom hook | A freetext field for any hook name not in the preset list | Your theme or plugin registers its own action, or you need a hook outside the preset set |
| Hidden in editor | Hides the block's output in the editor canvas without removing it | The hook fires something visually noisy or layout-breaking during editing |
Styling
The Hook block itself has no visual chrome of its own; what renders is whatever the hooked function outputs. The shared design panel is available for spacing around the block, and states apply if you want to scope visibility by breakpoint or condition.
Accessibility
The Hook block delegates rendering entirely to the attached functions. Accessibility depends on what those functions output. If the hooked output includes images, interactive controls, or dynamic content, make sure those outputs carry their own labels, alt text, and keyboard support at the source.