Hi Dan,
You can add a headline block, enter the text “post type”, give it a CSS class, eg. post-type:
https://www.screencast.com/t/RphqKswHwVb9
Then add this PHP snippet to replace the text “post type” with the real post type:
add_filter( 'render_block', function( $block_content, $block ) {
if ( ! empty( $block['attrs']['className'] ) && strpos( $block['attrs']['className'], 'post-type' ) !== false ) {
$post_id = get_the_ID();
$post_type = get_post_type($post_id);
$block_content = str_replace('post type',$post_type, $block_content );
}
return $block_content ;
}, 10, 2 );