Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
* 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