Skip to content

Instantly share code, notes, and snippets.

@funteractive
Created October 29, 2013 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funteractive/7211495 to your computer and use it in GitHub Desktop.
Save funteractive/7211495 to your computer and use it in GitHub Desktop.
読み込むテンプレートを変える。例は著者ページでhome.phpを読み込む場合。
<?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