Hi
I have a few blocks setup and when setting the 'multiple' option to false ('multiple' => false) it does not restrict the block as described here https://docs.metabox.io/extensions/mb-blocks/#multiple I can add more than one block per page/post and save it. Im using WordPress 6.0.1 and latest version of blocks addon.
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
$meta_boxes[] = [
'title' => 'Product Listing Block',
'id' => 'dc-product-listing-block',
'description' => 'Product listing layouts for your store',
'type' => 'block',
'icon' => 'screenoptions',
'category' => 'dc-blocks',
'context' => 'side',
'render_template' => __DIR__ . '/template/dc-product-listing-block-template.php',
'supports' => [
'align' => ['wide', 'full'],
],
'keywords' => ['product', 'listing', 'ecommerce'],
'multiple' => false,
'reusable' => false,
'preview' => [
'image' => '', // Image ID
'title' => 'Product Block',
'description' => 'Product listing layout block',
],
'fields' => [
[
'type' => 'number',
'id' => 'per_page',
'name' => 'Posts per page',
'min' => 1,
'max' => 100, //max of 100 (WP API only supports this by default)
'required' => true,
'std' => 10,
]
],
];
return $meta_boxes;
} );