Skip to content

Instantly share code, notes, and snippets.

@joeyz
Created October 20, 2014 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyz/623e6156a07d6579b5e0 to your computer and use it in GitHub Desktop.
Save joeyz/623e6156a07d6579b5e0 to your computer and use it in GitHub Desktop.
Genesis template page redirect for taxonomy
/**
* [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