In an upcoming course on Theming with Gutenberg I felt it was important to tackle the phrase "Gutenberg Compatible" that has come up in various discussions in the community as well as with some new themes being marketed as "Gutenberg Compatible." The take away from the video is summed up in this quote from one of … Continue reading What Does “Gutenberg Compatible Theme” Mean?
While working on my Gutenberg Development Course I was really happy to find out that the core developers ported over much of the internationalization features we are familiar with on the PHP side into a client side library available as wp.i18n. Example of __() in Action https://gist.github.com/zgordon/6d65957530c2598b0cc4d041e1a1dd15 Since wp.i18n is available in the global scope, you can access … Continue reading How to Use wp.i18n.__() to Allow for Translation of Your Gutenberg Block Text
While working on my Gutenberg Development Course, one of the hardest things I found to research was how to add block templates to your WordPress theme or plugin. Block templates are a way to have certain blocks show up by default for a new post, page or custom post type. You can also "lock" the template to … Continue reading How to Add Block Templates to Your WordPress Theme or Plugin
While working on my Gutenberg Development Course I realized that default toolbar buttons have a nice Tooltip that appears over them on hover. I also remembered seeing a Tooltip component in Gutenberg when walking through the source code. It turns out it is pretty easy to add these in our own block as well. Setting Up the … Continue reading How to Use the Tooltip Component in Gutenberg
At WordCamp US in early Dec 2017 I set out a goal to release a Gutenberg Development Course by the end of the year. As of writing it is New Years Eve 2017 and I just made it! One of the important functions I learned about while working on the course is registerBlockType, which is used to register … Continue reading Sneak Peak Video from My Gutenberg Development Course – “An Overview of registerBlockType”
One of the cool things I picked up while working on my Gutenberg Development Course was how to set a default color palette for all blocks inside your theme. Interestingly, as far as I can tell, defining custom color schemes is something only a theme should do and this cannot be set from within a custom block. Block Color … Continue reading How to Add a Custom “Color Palette” to Your WordPress Theme