9 Comments

  1. Jeff Chandler

    It was explained to me that converting the template into individual blocks is a nice workaround if you need to tweak the template for a specific post.

    Report

    • Nick

      Exactly – you have to convert it to a regular block ! Also, even though Reusable Blocks are CPTs as you mentioned they are not available for exporting from the tools menu. You can only export one Reusable Block at a time, which is pain if you have dozens of them. The mass export functionality was there with the Gutenberg Plugin used with WP 4.9x. When WP 5.0 came around, this disappeared. I reported the issue on Slack and whoever responded, were surprise that exporting from the tools menu is not available. That was in December, here we are 6 months later, and nothing is done…

      It’s ok though, someone created the plugin “fabrica-reusable-block-instances” which not only gives you the option to export all Reusable Blocks at once, but also, it shows you where each Reusable Block is been used, which is very useful, especially when you are deleting those blocks…

      Anyone suggesting to include these 2 functionalities to the core will be total waste of time and frustration…

      Report

      • Ronaldo Frererra

        Actually suggesting anything to the core is since a year or so a total waste of time for “non-regular” “outsiders”, we tried, we know, kthxbye.

        Report

    • Anh Tran

      Yes, a reusable block is like global block with specific configuration. When we need to change it for a specific post, we need to duplicate it and change the configuration. In Gutenberg, duplication a reusable block means converting it to a normal block.

      Report

  2. Kristin Aus

    Jeff, thank you!

    This may not be the sexiest topic ever but it is very important to me! My not too techie clients need simple and cheap to set up options. So far I see reusable blocks as a great solution.

    Please write more on this topic as you use this feature further!

    Report

  3. Elías Gómez

    “While there is a link to manage them within the reusable block selector, there isn’t a dedicated item within the admin menu. Unless you know the location of the management link, adding and managing them can be a bit more time-consuming.”
    You also have it in the main menu: https://imgur.com/a/BF8i4oh

    “I noticed that I was unable to add a block inside the reusable block, it’s still a bummer that I can’t add a block inside the template for a singular purpose if a need arises”
    You can, converting it to a regular block. That’s logical and easy for me. Screenshot: https://imgur.com/a/REqKvf4

    Report

  4. David Huyck

    We also thought it was silly that there wasn’t a menu for the Reusable Blocks, so we added one:

    add_action( ‘admin_menu’, function () {
    if ( ( current_user_can( ‘edit_posts’ ) ) ) {
    add_menu_page(
    __( ‘Reusable Content Blocks’, ‘domain’ ),
    ‘Reusable Blocks’,
    ‘edit_posts’,
    ‘edit.php?post_type=wp_block’,
    ”,
    ‘dashicons-controls-repeat’,
    21
    );
    }
    } );

    Report

    • Dublin SEO

      Thanks for the code. Now I can offer preset blocks to my clients.

      The problem is that the add_menu_page() function doesn’t work with edit.php?post_type=, because it always appends admin.php. I solved the problem by adding it as a submenu for my theme settings panel.

      Report

  5. Dublin SEO

    I would supply 20 or 30 .json files with Reusable Blocks and the theme admin would be able to use them in their posts or pages.

    How could I import them programatically on theme activation?

    Report

Comments are closed.

%d bloggers like this: