How to make the Reusable Blocks Visible in the WordPress Menu

Hi guys,

How are you?

Today I bring you a small tutorial but I think it is very useful if you are working with Gutenberg and especially with the Reusable Blocks.

Something wonderful that Gutenberg has is the possibility to create your own blocks, save them and use them as many times as you want.

For those who don't know, creating a reusable block is very simple.

Create Reusable Blocks

A reusable block can be made up of one or more blocks, making it ideal for creating custom elements and then being able to use them on any page or post.

To create a reusable block, it is as easy as standing on top of the block, clicking on the 3 dots and selecting the Create a reusable block option, as you can see in the following screenshot.

WordPress screenshot of a reusable block being created

Once the reusable block is created, if you want to use it, just add a new block and look for the name you have given it:

Reusable block name

Manage Reusable Blocks

As we have seen, adding a reusable block is very simple. But how will it be to manage them?

You will see how easy it is but we are going to make it even easier 😉

The first thing you have to know is that if you modify the reusable block it will be modified in all those places where it is inserted. Something really useful.

If you want it not to be like that, you can always use the option Convert to Normal Blocks.

When you do that, the mods won't be global, but only the block you're in will be modded.

To modify a reusable block you have 3 options:

Modify a Reusable Block from an Embedded Block

The first and easiest option to modify a block is to go to a page or post where you have inserted the block, modify what you want and save. Once done it will be modified in all inserted places.

Modify a Reusable Block from Manage Reusable Blocks

You won't always want to modify a block from an input, or you may just want to see all your reusable blocks in one place.

To do it you have to go to the + to add a new block, go to the Reusable option and click on Manage reusable blocks:

screenshot of manage reusable blocks

Once you click you get to a screen where you have all the reusable blocks:

Screenshot of the reusable blocks

And from here you can manage the reusable blocks just like you would posts, pages, or any other type of content.

Problem? That by default you cannot reach this screen if it is not as we have done here, but then I am going to tell you how we can turn this option into a WordPress administration menu

How to make the Reusable Blocks Visible in the WordPress Menu

It seems very strange to me that this option is not standard, but surely there is some reason why it is not activated as standard.

In order to add the direct access menu option to the management of reusable blocks we can add the following code in the Functions.php file of our template.

Remember to make a backup before doing it and use a child template

/**
 * Reusable Blocks accessible in backend
 * @link https://www.billerickson.net/reusable-blocks-accessible-in-wordpress-admin-area
 *
 */
function be_reusable_blocks_admin_menu() {
    add_menu_page( 'Reusable Blocks', 'Reusable Blocks', 'edit_posts', 'edit.php?post_type=wp_block', '', 'dashicons-editor-table', 22 );
}
add_action( 'admin_menu', 'be_reusable_blocks_admin_menu' );

I have found the code in this article

Once done we will see how the Reusable Blocks option appears on our WordPress desktop:

Screenshot of the reusable blocks option on the WordPress dashboard

I have also found that it can be done with a plugin but it is so easy to do it with code that I prefer not to load more plugins, the plugin is called Reusable Blocks Admin Menu Option

I hope it has been useful to you 😉

Leave a comment