Trying to make my first block using the InnerBlock feature, and I don’t have any button in my rendered block to add any blocks inside it.
Here’s my block definition:
$blockName = 'tabbed-nav';
acf_register_block_type(array(
'name' => $blockName,
'title' => __('Tabbed Nav'),
'description' => __('Display a tabbed nav interface.'),
'render_template' => 'blocks/'.$blockName.'/render.php',
'mode' => 'preview',
'category' => 'mm-blocks',
'icon' => 'align-pull-right',
'keywords' => array( 'tab', 'nav' ),
// 'enqueue_style' => get_template_directory_uri() . '/blocks/'.$blockName.'/styles.css',
//'enqueue_script' => get_template_directory_uri() . '/blocks/'.$blockName.'/scripts.js',
));
And heres my rendered block:
<div class="mm-custom-block tabbed-nav-block alignwide" style="min-height: 100px;">
<h2>this is the group block</h2>
<div><InnerBlocks /></div>
</div>
In the page editor, I can add my block without any problem. The <h2> text renders correctly, but after it I don’t have any button to click to add additional blocks to this block.
Anyone able to take a look at this code and suggest what I’m missing?