diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 00573a6f87..17d303ba18 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -199,7 +199,7 @@ final class WP_Theme implements ArrayAccess { } // (If template is set from cache, we know it's good.) - if ( ! $this->template && ! ( $this->template = $this->get('Template') ) ) { + if ( ! $this->template && ! ( $this->template = $this->headers['Template'] ) ) { if ( file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) { $this->template = $this->stylesheet; } else {