Do you want to create a reusable block in the WordPress block editor?
Reusable blocks allow you to save any content block and reuse them in other posts and pages on your website, which saves time and effort.
In this article, we will show you how to easily create a reusable block in the WordPress block editor.
What Is a Reusable Block in WordPress?
A reusable block in the WordPress block editor is a content block that can be saved individually to be used later.
Most users just save their reusable content snippets as text files on their computers and then copy and paste them when needed.
However, the Gutenberg block editor solves this problem by introducing reusable blocks.
A reusable block allows users to create a block of content and save it in their block editor. This block can then be inserted into any WordPress post or page without having to recreate the content from scratch.
This saves time and also enables you to maintain a consistent design or style across pages or posts.
Here are just some of the scenarios when a reusable block can help you work more efficiently:
- Asking users to follow you on social media at the end of each article
- Adding call-to-action buttons in your WordPress posts and pages
- Saving and reusing tables
- Quickly adding feedback forms to your pages
- Manually adding inline affiliate banners
- Saving and reusing nested blocks
That being said, let’s take a look at how to easily create a reusable block in the WordPress block editor.
How to Create a Reusable Block in WordPress Gutenberg Editor
All Gutenberg blocks are individual content elements in the WordPress editor that can also be saved as reusable blocks.
First, you need to open up an existing or new post to start creating a reusable block.
Once you have opened up the block editor, click the ‘+’ button in the top left corner of the screen.
This will open up the block menu, where you can drag and drop a new block that you want to reuse on multiple pages or posts.
For this tutorial, we will be choosing the Paragraph block to create a reusable block for a CTA content snippet.
After inserting the block, you need to add the content that you want to reuse.
You can also further style your block using different options from the block toolbar at the top or by using the block panel in the right corner of the screen.
Once you are done editing, you need to click on the three-dot menu button in the block toolbar.
This will open up a dropdown menu where you have to select the ‘Create Reusable Block’ option.
Next, you will be asked to enter a name for the reusable block.
We recommend using a name that helps you quickly identify the block and what it does.
After that, just click the ‘Save’ button to store your settings.
Your reusable block will now be saved in the WordPress database with all its settings.
How to add WordPress Reusable Blocks in Posts and Pages
Now that we have learned how to create a reusable block in WordPress, let’s see how to add reusable blocks to your WordPress posts and pages.
Once again, you will need to open a new or existing post where you want to add the reusable block in the Gutenberg editor.
From here, click the ‘+’ button in the top left corner of the screen and switch to the ‘Reusable’ tab from the top of the block menu.
Here, all the reusable blocks that you have created will be displayed in the panel.
You can also find your reusable block by typing its name in the search box.
Now, simply go ahead and click on the block to insert it into your post.
You can also edit the reusable block using the settings in the block toolbar or the block sidebar on the right.
However, please keep in mind that changing reusable block settings will change it in all the locations where you have used it.
If you just want to make a change that only appears on this particular post, then you will need to convert it to a regular block first.
To do this, you have to click the ‘Convert to regular block’ icon from the block toolbar at the top.
This will convert your reusable block into a regular one, and you can make changes to it without affecting the original block.
Managing All Reusable Blocks in WordPress Editor
After using reusable blocks for a while, you may have some blocks that you don’t use anymore or want to rename.
The Gutenberg editor allows you to easily manage all your reusable blocks from one screen.
To manage your blocks, just click on the ‘add block’+’ button in the top left corner and switch to the ‘Reusable’ tab.
From here, click the ‘Manage Reusable Blocks’ button at the bottom of the panel.
This will direct you to the Reusable Blocks page, where you can easily manage all the reusable blocks features on your WordPress website.
Here, you can edit, delete, import, or even export your blocks to another website.
How to Import / Export Reusable Blocks
Reusable blocks are not only reusable on the website they were created for. You can also use them on any other WordPress website.
To export the blocks from the Reusable Blocks page, you need to click the ‘Export as JSON’ link under the block.
WordPress will now send you the block as a JSON file that can be saved on your computer.
You can now switch to another WordPress site’s admin area. From here, visit the block management screen to view the reusable block options.
Next, click on the ‘Import from JSON’ button at the top.
This will show a file upload box where you must click the ‘Choose file’ button to select the block you downloaded earlier.
After that, click on the ‘Import’ button.
WordPress will now import your reusable block and save it in its database. You can go now ahead and start using the newly imported reusable blocks on your other WordPress website.
For more detailed instructions, you may want to see our step-by-step guide on how to import/export your WordPress content blocks (with screenshots).
We hope this article helped you learn how to create a reusable block in the WordPress block editor. You may also want to see our beginner’s guide on how to choose the best WordPress hosting and our top picks for the must-have WordPress plugins to help grow your website.