Hi Daniel,
The field custom_html does not save the value to the database, it is not supported to display/render on the frontend so it will not work with the block. You can create a custom function such as
function show_my_template( $post_id ) {
echo 'Post ID is: ' . $post_id;
}
Then add the custom function to the render callback function and pass the accepted arguments to the custom function
https://docs.metabox.io/extensions/mb-blocks/#render_callback
function my_hero_callback( $attributes, $is_preview = false, $post_id = null ) {
// Fields data.
if ( empty( $attributes['data'] ) ) {
return;
}
show_my_template( $post_id );
...
}