In this post we are going to start by commenting on one of the most important characteristics of Divi, and that is that its structure is divided into sections, rows and modules, and each and every one of them can be saved, exported, and used in other Divi projects. Can you export and import Gutenberg Blocks? Continue reading.
This is one of the most important features of the Gutemberg editod too, now we can save the blocks, export them to other projects or import other blocks to our current project.
This feature, in Gutemberg, may not be very well known, but it is a functionality that allows us to speed up the creation of websites, since we can reuse previous work, even if we make small changes.
Gutenberg Editor 101 Reusable Blocks
A reusable block in the WordPress editor is a block of content saved individually for later use.
Many times we may be asked to add the same pieces of content in various articles, such as calls to action at the end of the blog post or links to follow the blog on social networks.
Now you can save snippets of content in your WordPress editor and then reuse them anywhere.
We are going to create a reusable block.
The first thing is to create a publication, and we are going to add a block, in this case, a paragraph with text.
When we finish editing, click on the three-dot button and select the “Add to Reusable Blocks” option.
A name must be assigned for the reusable block. Preferably use a name that helps quickly identify the block and what it does.
Export Your Gutenberg Blocks
As we explained at the beginning of this post, reusable WordPress blocks can easily be exported for use on any other WordPress site.
From the page where we have the block with which we want to work, we click on the button to add a new block, once in the menu, we have to scroll to the bottom, we display the reusable option, and we will click on “Manage All Reusable Blocks”.
Now click on the Export as JSON option. Once you click on that option your block will be downloaded to your computer as a JSON file.
Import Your Gutenberg Block
Now that we want to import a block we will go to its block management screen. There we will find an Import from JSON button at the top.
When we click on that button to import, we will see a file upload box. We will click on the Choose file button and select the block JSON file that we downloaded previously, or the one that we want to use at that time.
We have now imported a new reusable block and it will be saved in the database. Once this is done, we can use it on any WordPress site.
We have already learned how to export and import Gutenberg Blocks, now you can already optimize your time and work thanks to this functionality.