From d74058fbb03f54fe6b688c81093b222b961e3d10 Mon Sep 17 00:00:00 2001 From: denisbaranov Date: Sat, 19 Oct 2019 10:42:18 +0300 Subject: [PATCH] fix get_template function --- includes/class-functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-functions.php b/includes/class-functions.php index ab35bac0..1b3d4b5c 100644 --- a/includes/class-functions.php +++ b/includes/class-functions.php @@ -181,6 +181,10 @@ if ( ! class_exists( 'UM_Functions' ) ) { $array = explode( DIRECTORY_SEPARATOR, trim( $basename, DIRECTORY_SEPARATOR ) ); $path = $array[0]; } + if ( substr_count( $path, '/' ) ) { + $array = explode( '/', trim( $basename, '/' ) ); + $path = $array[0]; + } $located = $this->locate_template( $template_name, $path ); if ( ! file_exists( $located ) ) {