Include a static block inside of a dynamic block

Server rendered blocks like that can’t have child blocks. The closest you can do is call do_blocks and pass it block markup, but this means pre-creating the block in the editor, and copy pasting it out. It would not be modifiable in the editor, or appear as a block. It would just be additional HTML … Read more

Restricting core block nested blocks

For anyone looking for something similar I came across this in a PR – https://github.com/WordPress/gutenberg/pull/31326#pullrequestreview-781388981 This filter setup has worked for any block that I’ve tried that has allowedBlocks set as an array in the block.json file.

Create a block variation of list elements

Since I am working with block attributes, I had to also define my attribute within my block.json file… block.json “attributes”: { “listOrdered”: { “type”: “boolean”, “default”: false } Now with that set in place, I can now run npm start, and see my block variant working well in wp-admin edit page. It allows me a … Read more