Using Block Patterns as content templates

Block patterns are great, one of the features I’m most excited for in WordPress. As block patterns mature and people adopt, they will be one of the best ways to share designs and templates. I’m looking forward to a rich repository to pull design ideas, the pattern directory is already filling up. Block patterns aren’t […]

Gutenberg and WordPress Core

I recently had the need to update Gutenberg packages that are in WordPress core for a point release. This required setting up a development environment where I can test Gutenberg code in WordPress but without using the Gutenberg plugin. This is not something most developers will need to do, it is my first time after […]

Make your own create-block templates

Did you know the create-block script can support templates? The templates allows you to create your own files to be generated for a new block. I can see this being quite useful especially if you are an agency or business that creates many custom blocks, or just to share different block starting points. What is […]

Conditionally Load Block Assets, Part 3

In WordPress 5.8, releasing on July 20, there is a much easier way to conditionally load block assets. This is the loading of JavaScript and/or stylesheets on the frontend only if the block is shown on the page. I wrote twice previously about solving this same problem. The first time, I solved checking if each […]

Contribute Developer Documentation to Gutenberg

Another post in my series on contributing to the WordPress Gutenberg project. This post complements my Good First Issue post that focused more on a coding contribution. Here I take a step back and focus on documentation and dive deeper into the GitHub pull request process. Find an Issue Browse the Documentation label on GitHub […]

Conditionally Load Block Assets, Part 2

Another look at conditionally loading block assets for WordPress blocks, assets being JavaScript and CSS files loaded by the browser. In the previous post, I solved using heavy-handed testing of each post in the loop checking to see if it contains our block to load the assets. The company I work for runs a few […]

Conditionally Load Block Assets

Updated: see Part 2 post that explains a better way, as pointed out in the comments. Or see the newer Part 3 post with an even easier way with WP 5.8. One of the great features of the WordPress Block Editor is all the specialty blocks that can be created. This can also be the […]

Build a Block Series – Part 7: Placeholder

In this seventh part, I do away with screencasting and work on improving the editor interaction with the QRCode block. Specifically, showing in the editor how the QRCode will look when published. Previous screencasts: Development Environment WordPress Plugin Anatomy of a Block Block Attributes ES6+ Syntax QRCode Intro One of the primary tenets of Gutenberg […]

Build a Block Series – Part 6: QRCode

In this sixth screencast I get down to implementing the QRCode part of the block: loading the qrcode.js library and trigger it using the saved URL to create a QRCode. Previous screencasts: Development Environment WordPress Plugin Anatomy of a Block Block Attributes ES6+ Syntax QRCode Implementation In the cast, I alter the block’s save function […]

Build a Block Series – Part 5: ES6+ Syntax

The fifth part of my series walking through building a Gutenberg block for the WordPress editor. This part takes a break from new block development to explain some features of ES6+ syntax used, specifically Destructuring assignments, Arrow functions, and Imports. Previous screencasts: Part 1: Development Environment Part 2: WordPress Plugin Part 3: Anatomy of a […]

Build a Block Series – Part 4: Block Attributes

The third part in my series walking through building a Gutenberg block for the WordPress editor. This lesson continues the anatomy of a block, specifically a block attributes. Previous casts: Development Environment WordPress Plugin Anatomy of a Block Block Attributes Attributes are the way a block stores data, they define how a block is parsed […]

Build a Block Series – Part 3: Anatomy of a Block

The third part in my series walking through building a Gutenberg block for the WordPress editor. This lesson covers the anatomy of a block. Previous casts: Development Environment WordPress Plugin Anatomy of a Gutenberg Block At its simplest, a block in Gutenberg is a JavaScript object with a specific set of properties. Here is the […]

Build a Block Series – Part 2: WordPress Plugin

The second part of my series walking through building a Gutenberg block for the WordPress editor. See Part 1: Development Environment. Part two covers creating a WordPress plugin and setting up the JavaScript build for block development. After this part, all the pieces are in place to start creating a block. WordPress Plugin A WordPress […]

Build a Block Series – Part 1: Development Environment

I’m kicking off a new series of screencasts for building a Gutenberg Block for the WordPress Editor. The intended audience is a developer who may not have experience with WordPress and/or JavaScript, so introductory level. The series will focus on building a QRCode block, that I have an idea for but have not yet built. […]

Good first issue on Gutenberg

This post and screencast walks through the process for how you can make your first contribution to Gutenberg. I walk through all my steps to submit this Gutenberg PR#18175 This follows up on my previous screencast for creating a Storybook story for Gutenberg components. Steps 1. Find issue to work on. Search using the good […]

Coding a Storybook Story

Being inspired by my colleague Jon Q videos for building a Gutenberg Component. I wanted to try my own, just focused on building the story part for Storybook. Q’s videos are great, they go deep into the thinking and details for designing components and a large component design system. My screencast is just short and […]

Allowing SVG in WordPress Content

I ran into an issue when trying to save SVG as part of a block. If you are having the same issue, or similar with non-typical tags being used; then here’s how you can fix it. In creating a Gutenberg block, adding an SVG element as part of the save() function it was being stripped […]

Making the Juxtapose Block

This post walks through my process of creating the Juxtapose Block for the WordPress block editor. The block implements the JuxtaposeJS library by Knight Lab which allows you to place two images side-by-side and use a slider to reveal the difference between them. Here’s an example: 📌 Note: This block was integrated into the Jetpack […]

Block Rocking WordPress

WordPress 5.0 introduces a new editor based around blocks. The editor is the first phase of a larger project developed under the Gutenberg name. This post is part three in my unplanned series: Part I – Creating a Gutenberg Block from October 2017 covers how to extend Gutenberg with a basic block. I wrote a […]

Gutenberg blocks without the build step

You can create Gutenberg blocks in ES6 code without the build step, this makes it easier to maintain and develop. I switched over my Code Syntax Highlighting block and am much happier for it. All of the Gutenberg examples by default use ES5 code, which already does not require transpiling with webpack, but they also include […]