Wordpress Gutenberg inner blocks

Posted by Fabian McElhill - 1 min read
Wordpress Gutenberg inner blocks

In this article we’ll explore a common approach to adding nested inner blocks in Gutenberg.

Import the inner block props

import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';

Set the variable

const innerBlocksProps = useInnerBlocksProps();

On the view file, just add your markup

<div {...blockProps}>
  <div>
    <div {...innerBlocksProps} />
  </div>
</div>

Related Articles

©2026 - Syntax by Wurkhouse | All Rights Reserved