From the course: WordPress Development: Coding Practice

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Create your own block pattern

Create your own block pattern

- [Instructor] One of the great things about the block editor in WordPress is the ability to create reusable blocks and block patterns. So let's say we have a common set of blocks where the information could change that we like to use and reuse and we don't want to have to copy and paste them. A reusable block won't work here because when we change the reusable block in one place we change it every place. So we're going to need a block pattern. Now there are a couple of steps you need to do before we actually get to the coding phase. First, you'll want to build out the blocks in the block editor. Then you'll want to select and copy all of those blocks. Next, you'll need to run them through the json formatter over at jssoformatter.org/json-escape. This will properly escape our block pattern. Then you'll use that output for the text in the plugin. If you want to learn more about creating block patterns check out my course…

Contents