Last active
October 13, 2015 01:18
-
-
Save hissy/4116825 to your computer and use it in GitHub Desktop.
[WordPress] Override Loading Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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