0

I found this toolkit online for building custom Gutenberg Blocks: create-guten-block.

I installed it and looked through the files, but I can't find any decent documentation online on how to write custom blocks this way.

Does anyone know where I can find a good course or documentation on how to write the code?

0

The Block Editor Handbook offers the official documentation, along with some examples, including a Blocks Tutorial. It's improving over time to include more and more information and examples.

The JS for WP site offers some tutorials. The caveat is the Gutenberg Block Development course and the Advanced Gutenberg course were both created in the early days, so the specific code tends to be outdated, but the principles are still similar enough I've found them useful.

You may also wish to search for more specific tutorials once you've run through the basic examples. GitHub is also full of open-sourced blocks. I've personally found it helpful, when searching for tutorials and examples, to make sure I'm using ones that have been written most recently. Anything more than about 6 months old tends to use outdated code - the editor and the way you code for it is constantly evolving.

0

If you are familiar with creating templates in PHP, a soft start to your own blocks can be a plugin like Block Lab. Just write the html/php in the given template, using arguments from the editor. Like showing all books from a given author, or anything you can access by querying.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.