Skip to content

Commit

Permalink
Full Site Editing: Fix template parts not loading in frontend (#28752)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyip authored and noisysocks committed Feb 5, 2021
1 parent 34d8338 commit f7abb22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f7abb22

Please sign in to comment.