diff --git a/packages/block-library/src/template-part/index.php b/packages/block-library/src/template-part/index.php index be867c4ced1660..c73b64408733dc 100644 --- a/packages/block-library/src/template-part/index.php +++ b/packages/block-library/src/template-part/index.php @@ -70,7 +70,9 @@ function render_block_core_template_part( $attributes ) { if ( 0 === validate_file( $attributes['slug'] ) ) { $block_template = get_block_file_template( $template_part_id, 'wp_template_part' ); - $content = $block_template->content; + if ( isset( $block_template->content ) ) { + $content = $block_template->content; + } if ( isset( $block_template->area ) ) { $area = $block_template->area; }