diff --git a/php/helpers.php b/php/helpers.php index e98d03f5d..80665091d 100644 --- a/php/helpers.php +++ b/php/helpers.php @@ -195,15 +195,15 @@ function block_lab_locate_template( $template_names, $path = '', $single = true } } - if ( file_exists( trailingslashit( $stylesheet_path ) . $template_name ) ) { - $located[] = trailingslashit( $stylesheet_path ) . $template_name; + if ( file_exists( trailingslashit( $template_path ) . $template_name ) ) { + $located[] = trailingslashit( $template_path ) . $template_name; if ( $single ) { break; } } - if ( file_exists( trailingslashit( $template_path ) . $template_name ) ) { - $located[] = trailingslashit( $template_path ) . $template_name; + if ( file_exists( trailingslashit( $stylesheet_path ) . $template_name ) ) { + $located[] = trailingslashit( $stylesheet_path ) . $template_name; if ( $single ) { break; }