Created
October 20, 2014 14:09
-
-
Save joeyz/623e6156a07d6579b5e0 to your computer and use it in GitHub Desktop.
Genesis template page redirect for taxonomy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* [WordPress] Template Redirect | |
* Use archive-books.php for Genre taxonomy archives. | |
*/ | |
add_filter( 'template_include', 'sk_template_redirect' ); | |
function sk_template_redirect( $template ) { | |
if ( is_tax( 'sports-book-cat' ) ) | |
$template = get_query_template( 'archive-books' ); | |
return $template; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment