Skip to content

Commit f7abb22

Browse files
jeyipnoisysocks
authored andcommitted
Full Site Editing: Fix template parts not loading in frontend (#28752)
1 parent 34d8338 commit f7abb22

File tree

1 file changed

+1
-1
lines changed
  • packages/block-library/src/template-part

1 file changed

+1
-1
lines changed

packages/block-library/src/template-part/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function render_block_core_template_part( $attributes ) {
1919
// If we have a post ID and the post exists, which means this template part
2020
// is user-customized, render the corresponding post content.
2121
$content = get_post( $attributes['postId'] )->post_content;
22-
} elseif ( isset( $attributes['theme'] ) && basename( wp_get_theme()->get_stylesheet() ) === $attributes['theme'] ) {
22+
} elseif ( isset( $attributes['theme'] ) && wp_get_theme()->get_stylesheet() === $attributes['theme'] ) {
2323
$template_part_query = new WP_Query(
2424
array(
2525
'post_type' => 'wp_template_part',

0 commit comments

Comments
 (0)