Group

In this article


Gather blocks in a layout container.

  • Name: core/group
  • Category: design
  • API Version: 3
  • Block Type: Static (saved in post content)
  • Keywords: container, wrapper, row, section

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
tagName string "div"
templateLock string \| boolean Enum: all, insert, contentOnly, false

Supports

Defined via the supports property in block.json.

Block Markup

This is a static block. The markup is saved directly in the post content.

<!-- wp:group {"align":"full","backgroundColor":"secondary","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull has-secondary-background-color has-background">
    <!-- wp:paragraph -->
    <p>This is a group block.</p>
    <!-- /wp:paragraph -->

    <!-- wp:paragraph -->
    <p>Group block content.</p>
    <!-- /wp:paragraph -->
    </div>
    <!-- /wp:group -->

Source