Skip to main content

Hooked Blocks via Block Hooks API

The Block Hooks API (WP 6.4+) lets a block declare it should auto-insert relative to another block. blockHooks in block.json maps target block names to positions (before, after, fi…

March 25, 2026 WordPress chris 1 min read Gutenberg

Article takeaway

The Block Hooks API (WP 6.4+) lets a block declare it should auto-insert relative to another block. blockHooks in block.json maps target block names to positions (before, after, fi…

The Block Hooks API (WP 6.4+) lets a block declare it should auto-insert relative to another block. blockHooks in block.json maps target block names to positions (before, after, firstChild, lastChild).

This is the right way to add a ‘powered by’ block after every footer template part, or to extend a third-party theme without forking it.

Hooks fire at insert time, not on render — the user sees the resulting block in the editor and can remove it.

Share X / Twitter LinkedIn

Leave a comment

Related Posts