Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created December 7, 2011 18:39
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 billerickson/1444031 to your computer and use it in GitHub Desktop.
Save billerickson/1444031 to your computer and use it in GitHub Desktop.
<?php
/**
* Code Template
* Use archive-code.php template for any taxonomy archives in 'code-tag' taxonomy
*
* @param string, default template path
* @return string, modified template path
*/
function be_code_template( $template ){
if( is_tax( 'code-tag' ) )
$template = get_query_template( 'archive-code' );
return $template;
}
add_filter( 'template_include', 'be_code_template' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment