theme.json Is the New functions.php (for Styles)
theme.json is the canonical place to configure block editor styles, settings, and tokens. Colour palettes, font sizes, layout sizes, and spacing units all live there.The big benefi…
Read article →theme.json is the canonical place to configure block editor styles, settings, and tokens. Colour palettes, font sizes, layout sizes, and spacing units all live there.The big benefi…
Read article →The Block Bindings API connects block attributes to dynamic data sources — post meta, options, or any registered source. core/paragraph can read its content from…
Read article →A block pattern is a template — inserting it copies the blocks into the document, and edits do not affect the pattern. A reusable block…
Read article →Set show_in_rest to true unless you have a specific reason not to — without it, the Gutenberg editor falls back to the classic interface.Set supports…
Read article →block.json is the canonical block manifest. name uses the namespace/block-name form. apiVersion: 3 opts in to iframe rendering for parity with the front end.Use render…
Read article →The lowest-risk migration: keep the classic theme, add theme.json, and start using block patterns and blocks alongside existing PHP templates. The site stays the same;…
Read article →Declare every dependency in the array: wp_enqueue_script('my', ..., ['wp-element', 'jquery']). WordPress resolves the load order automatically.For modules use wp_enqueue_script_mod…
Read article →For modern enqueues, wp_add_inline_script with a script handle is cleaner than wp_localize_script. It does not require a global variable name.For block editor data, use wp.data…
Read article →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…
Read article →