From f7abb2272572a332d8f332c3b17fbf0a06a00047 Mon Sep 17 00:00:00 2001 From: Jeremy Yip Date: Thu, 4 Feb 2021 12:27:10 -0800 Subject: [PATCH] Full Site Editing: Fix template parts not loading in frontend (#28752) --- packages/block-library/src/template-part/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/template-part/index.php b/packages/block-library/src/template-part/index.php index a960aa969bc90..40e7312bcb8ad 100644 --- a/packages/block-library/src/template-part/index.php +++ b/packages/block-library/src/template-part/index.php @@ -19,7 +19,7 @@ function render_block_core_template_part( $attributes ) { // If we have a post ID and the post exists, which means this template part // is user-customized, render the corresponding post content. $content = get_post( $attributes['postId'] )->post_content; - } elseif ( isset( $attributes['theme'] ) && basename( wp_get_theme()->get_stylesheet() ) === $attributes['theme'] ) { + } elseif ( isset( $attributes['theme'] ) && wp_get_theme()->get_stylesheet() === $attributes['theme'] ) { $template_part_query = new WP_Query( array( 'post_type' => 'wp_template_part',