Skip to content

Commit

Permalink
Fix current template retrieval during render
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 13, 2020
1 parent 326d349 commit 2528cfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function get_template_hierachy( $template_type ) {
function gutenberg_override_query_template( $template, $type, array $templates = array() ) {
global $_wp_current_template_id, $_wp_current_template_content;

$current_template = gutenberg_find_template_post_and_parts( basename( $template, '.php' ), $templates );
$current_template = gutenberg_find_template_post_and_parts( $type, $templates );

if ( $current_template ) {
$_wp_current_template_id = $current_template['template_post']->ID;
Expand Down

0 comments on commit 2528cfa

Please sign in to comment.