Created
October 29, 2013 09:29
-
-
Save funteractive/7211495 to your computer and use it in GitHub Desktop.
読み込むテンプレートを変える。例は著者ページでhome.phpを読み込む場合。
This file contains hidden or 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 | |
function change_default_template( $template ){ | |
if( is_author() ){ | |
$template = get_home_template(); | |
} | |
return $template; | |
} | |
add_filter( 'template_include', 'change_default_template' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment