Learn how to create Gutenberg blocks from scratch
summary
Workshop shows creating a Gutenberg block from scratch using node & npm, LocalWP and the official @wordpress/create-block scaffold, runs with npm start and webpack, and exposes the plugin files: src, build, block.json and index.js. It implements block attributes, RichText inputs, InspectorControls, alignment and color support via block.json, shares state between editor and front with useBlockProps, and then converts the block to a render.php dynamic block using register_post_meta; builds run live and a small typo is fixed onstage.
AI-written summary · about
chapters (14)
- 0:00Introduction to Gutenberg blocks
- 2:09Installing prerequisites
- 11:19Setting up WordPress environment
- 13:24Creating a block with wp-scripts
- 18:36Anatomy of a block plugin
- 28:33Editing the block JSON file
- 32:38Adding attributes to the block
- 36:15Using React components in the editor
- 49:07Adding Inspector Controls
- 1:04:34Block supports and styling
- 1:18:02Conditional rendering in blocks
- 1:30:16Dynamic blocks with PHP
- 1:46:32Custom fields and post meta
- 1:57:32Summary and Q&A
