diff --git a/src/wp-includes/blocks/template-part.php b/src/wp-includes/blocks/template-part.php index 3837a0a17d..bef49341d7 100644 --- a/src/wp-includes/blocks/template-part.php +++ b/src/wp-includes/blocks/template-part.php @@ -22,7 +22,7 @@ function render_block_core_template_part( $attributes ) { if ( isset( $attributes['slug'] ) && isset( $attributes['theme'] ) && - get_stylesheet() === $attributes['theme'] + wp_get_theme()->get_stylesheet() === $attributes['theme'] ) { $template_part_id = $attributes['theme'] . '//' . $attributes['slug']; $template_part_query = new WP_Query(