Skip to content

Instantly share code, notes, and snippets.

@digamber89
Created March 16, 2017 17:37
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 digamber89/3e00da8d7d4e03359a2c9db3ab5f7ea0 to your computer and use it in GitHub Desktop.
Save digamber89/3e00da8d7d4e03359a2c9db3ab5f7ea0 to your computer and use it in GitHub Desktop.
Change Front Page Template
add_filter( 'template_include', 'portfolio_page_template', 99 );
function portfolio_page_template( $template ) {
if ( is_front_page() ) {
$new_template = locate_template( array( 'tpl-duplicate-homepage.php' ) );
if ( '' != $new_template ) {
return $new_template ;
}
}
return $template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment