WordPress Reusable Blocks Are Awesome
One of my favorite features included in the release of WordPress 5.0 — aka Gutenberg — was mentioned in our 9 Questions About Gutenburg. There were some stellar new features included in this release of WordPress that can be very helpful for those wanting to do more within their WordPress pages, but Reusable Blocks are easily the most powerful.
What Are Reusable Blocks?
Reusable Blocks are exactly that — blocks that can be reused!
There are two primary ways to use a Reusable Block:
- As a template block that you can use on a regular basis with your pages.
- A repeatable block that will change globally when edited.
You have to be a little careful when using Reusable Blocks as a template, but using Reusable Blocks as a repeatable block is a very powerful way to manage content on your website.
Let’s take a look at how to create and use Reusable Blocks within your website.
Create Your Reusable Block
Reusable Blocks are completely customizable. So you won’t find the option to add Reusable Blocks until you create your first block.
To create your first Reusable Block, use any block content — paragraph text, a bullet-point list of links, custom HTML, a widget, or anything else you populate in a WordPress block.
Select the block that you would like to convert into a Reusable Block and “Add to Reusable Blocks”:
Now you’ll be able to find your block with all the other blocks within WordPress:
Next, let’s use our newly created Reusable Block titled, “Content to Use” (lame title, I know).
How to Use Your Reusable Blocks
Begin adding your Reusable Block like any other:
As you can see in the screenshot above, this is the third Reusable Block we’ve created, it’s a Paragraph block, and you can also see it includes a preview.
Now with it added, there’s a few different things we can do:
Rename the Reusable Block — this creates an entirely new Reusable Block, a great way to create a new Reusable Block based on a previous version.
Using Reusable Blocks Like Templates
You can also “Convert to Regular Block”:
This is how you can use Reusable Blocks as a “template” for your content. This action takes the content within the Reusable Block and converts it to a normal block, unique to the page or post you are using it in. Keep in mind, however, if the block is not converted to a Regular Block and changes are made to the content within the block, the Reusable Block being used as a “template” will also be changed.
Behold the Power of (Repeatable) Reusable Blocks
Finally, the most powerful feature of Reusable Blocks.
In our example, below, we are using a bullet list that was created in a Reusable Block:
Let’s add a fourth item to that list — but it’s also been added to three other pages. By editing this one Reusable Block, it will updated on all of the pages.
Under the Reusable Blocks, click the “Manage All Reusable Blocks” link.
From there, navigate to the block that needs editing, make your changes, and update:
Now when we navigate to the page where this particular Reusable Block has been used, we can see the content has been updated:
If you have any questions, please feel free to leave a comment and we’ll see if we can point you in the right direction. If you’re a client with Valet, you can reach out to the Client Success team and we’ll help walk you through the entire process.
Reusable Blocks is a new and powerful feature within WordPress that should be talked about a lot more. This is easily one of the most powerful new features added to WordPress since Custom Post Types were introduced.
In the end, this new feature will be a great way to help developers build websites that are not only easier for users to manage their own content, but also a really easy way for users to make their website more dynamic without any additional development.
Here at Valet, we have already started leveraging this new feature to help our clients make their websites more awesome — and everyone is loving it.