Skip to content

Commit

Permalink
FSE: allow themes to live in a sub directory (#26391)
Browse files Browse the repository at this point in the history
* FSE: allow themes to live in a sub directory

* refactor to use method instead of private property, see 26275
  • Loading branch information
scruffian authored Oct 22, 2020
1 parent 9f30a99 commit 1ad4242
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'] ) && wp_get_theme()->stylesheet === $attributes['theme'] ) {
} elseif ( isset( $attributes['theme'] ) && basename( 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 1ad4242

Please sign in to comment.