Skip to content

Instantly share code, notes, and snippets.

@hissy
Last active October 13, 2015 01:18
Show Gist options
  • Save hissy/4116825 to your computer and use it in GitHub Desktop.
Save hissy/4116825 to your computer and use it in GitHub Desktop.
[WordPress] Override Loading Template
<?php
/**
* This is a example: force to use index.php at tag archive
*/
function my_template_include($template){
if ( is_tag() ) {
$template = get_index_template();
}
return $template;
}
add_filter('template_include','my_template_include');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment