diff --git a/includes/class-sp-template-loader.php b/includes/class-sp-template-loader.php index 94b586ef..b6fdbd2b 100644 --- a/includes/class-sp-template-loader.php +++ b/includes/class-sp-template-loader.php @@ -108,15 +108,15 @@ class SP_Template_Loader { * Templates are in the 'templates' folder. sportspress looks for theme * overrides in /theme/sportspress/ by default * - * For beginners, it also looks for a sportspress.php template first. If the user adds - * this to the theme (containing a sportspress() inside) this will be used for all - * sportspress templates. + * For beginners, it also looks for a sportspress.php template last. If the user adds + * this to the theme (containing a sportspress() inside) this will be used as a + * fallback for all sportspress templates. * * @param mixed $template * @return string */ public function template_loader( $template ) { - $find = array( 'sportspress.php' ); + $find = array(); $file = ''; if ( is_single() ): @@ -174,6 +174,8 @@ class SP_Template_Loader { endif; + $find[] = 'sportspress.php'; + if ( $file ): $located = locate_template( $find ); if ( $located ):