Adjust template loader for themes

This commit is contained in:
Brian Miyaji
2014-05-05 17:17:07 +10:00
parent 9f60c87231
commit 6fa48cddfc

View File

@@ -134,15 +134,18 @@ class SP_Template_Loader {
break;
endswitch;
elseif ( is_tax( 'sp_venue' ) || is_tax( 'sp_season' ) ):
elseif ( is_tax() ):
$term = get_queried_object();
$file = 'taxonomy-' . $term->taxonomy . '.php';
$find[] = 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';
$find[] = SP_TEMPLATE_PATH . 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';
$find[] = $file;
$find[] = SP_TEMPLATE_PATH . $file;
switch( $term->taxonomy ):
case 'sp_venue':
$file = 'taxonomy-venue.php';
$find[] = 'taxonomy-venue-' . $term->slug . '.php';
$find[] = SP_TEMPLATE_PATH . 'taxonomy-venue-' . $term->slug . '.php';
$find[] = $file;
$find[] = SP_TEMPLATE_PATH . $file;
endswitch;
endif;