Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1 Blockstudio 4.1
Blockstudio 4.1 16/02/2023

We're thrilled to announce the release of Blockstudio 4.1!

In this release, we've packed in a range of exciting new features and improvements that we think you're going to love. From enhanced block customization options and editor enhancements, Blockstudio 4.1 takes your Gutenberg block-building experience to the next level. And, thanks to the invaluable feedback of our users, we've also addressed numerous bugs and made important optimizations to ensure that the plugin runs more smoothly than ever before.

Let's dive in and take a closer look at what's new.

Block conditions

One of the most exciting new features in Blockstudio 4.1 is the ability to define conditions for a block within the block.json file. This means that you can now set conditions for when a block should be displayed based on the post ID or post type, giving you more control over where and how your block is displayed.

For example, if you only want a block to appear on posts with a certain ID, you can now specify this in the block.json file for that block. Alternatively, if you have a block that is only applicable to certain post types (such as products or events), you can now set these conditions so that the block only appears on those specific post types.

block.json

            {
      "name": "blockstudio/native",
      "title": "Native Block",
      "category": "text",
      "icon": "star-filled",
      "description": "Native Blockstudio block.",
      "blockstudio": {
        "conditions": [
          [
            {
              "type": "postType",
              "operator": "==",
              "value": "page"
            }
          ]
        ]
      }
    }

      
Copy

Context data

We've added new context information to the $block variable, which makes it easier to access post data and other important information when a block is inside a loop.

index.php

            <div>
      <h1>
        This is the data of current
        element inside the loop:
        <?php echo $block['context']['postId'] ?>
        <?php echo $block['context']['postType'] ?>
      </h1>
      <h1>
        This is the data the current post:
        <?php echo $block['postId'] ?>
        <?php echo $block['postType'] ?>
      </h1>
    </div>
Copy

Block export & import

Blocks can now be exported and imported from the editor. The new import and export functionality allows for easier management and sharing of your blocks. To access these options, simply right-click on the block you want to import or export and select the corresponding option from the context menu.

context menu

Attribute preview in editor

Blockstudio 4.1 includes a new live preview that allows you to see how your block attributes will look when rendered inside the Gutenberg editor sidebar. This feature is especially useful for developers who want to fine-tune the appearance of their block UI or test different layouts and conditional logic.

attributes preview

In addition to the major new features we've highlighted here, the new version includes numerous bug fixes and performance enhancements. Many of these improvements were suggested by our users, so thank you to everyone who took the time to provide feedback and suggestions!

🍪 This website uses cookies to ensure you get the best experience on our website.

Accept Decline