Setting the file. One moment.
Skill 06 · Wp Block Development
Subchapter 6.3
references/creating-new-blocks.mdMarkdown2 KBView on GitHub
Use this file when you are creating a new block (or a new block plugin) from scratch.
@wordpress/create-block@wordpress/create-block scaffolds a modern block setup that tends to track current best practices.
Typical options to decide up front:
render.php / server rendering)Canonical docs:
For a modern interactive block, prefer the official Interactivity API template:
@wordpress/create-block-interactive-templateThis template is designed to integrate:
data-wp-*)viewScriptModule)render.php)References:
If you cannot run create-block (no Node tooling or restricted network):
block.json.register_block_type_from_metadata() in PHP.Then follow the rest of wp-block-development for metadata, registration, and serialization.