public
Created

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?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' );

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.