I created a block to display a custom data I fetch from the DB, I don't need customization (fields) for this blocks. But in the editor doesn't render de template unless there is a field and the field is filled.
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
$meta_boxes[] = [
'title' => 'My Block' ,
'id' => 'my-block' ,
'type' => 'block' ,
'mode' => 'preview' ,
'render_callback' => function () { echo '<h1>My Block</h1>'; },
];
return $meta_boxes;
});
I have set mode=preview
. What am I missing?