WordPress provides a way to get an array of blocks for a page with the parse_blocks() function. If you extract from that the specific block(s) you are interested in, you can then use render_block() to put the block on another page. This function would do that:
function example_extract_block_type_from_page( $post_id, $block_name ) {
//get post_content for page
$post_content = get_post( $post_id )->post_content;
//get all blocks of requested type
$blocks = array_filter( parse_blocks( $post_content ), function( $block ) use( $block_name ) {
return $block_name === $block['blockName'];
});
$block_content="";
foreach( $blocks as $block ) {
$block_content .= render_block( $block );
}
return $block_content;
}
You didn’t say where you wanted the testimonial to go on the other pages. If it’s outside of the main post content, then you could use a custom template and/or hooks to place it where you want. If it’s inside the main post content, then a custom shortcode might be the best way to do it.
function example_extract_block_type_from_page_shortcode( $atts=[] ) {
$defaults = [
'post_id' => 0,
'block_name' => ''
];
$atts = shortcode_atts( $defaults, $atts );
return example_extract_block_type_from_page( $atts['post_id'], $atts['block_name'] );
}
add_shortcode( 'example_extract_block_type_from_page', 'example_extract_block_type_from_page_shortcode' );
Then something like [example_extract_block_type_from_page post_id="123" block_name="myblock"]
would show the relevant block content.