WordPress front page template hierarchy modifications

djrmom

{{gist file=”multiple-front-pages.php” lang=”php”}}
<?php
/**
* Filters frontpage_template to allow both front-page.php as default static front page template while allowing
* users to select a different template in page options, also removes front-page.php from being used for the blog index
* From discussion in https://themehybrid.slack.com/archives/general/p1474838117000393
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

function prefix_front_page_template( $template ) {
return ( is_home() || locate_template( get_page_template_slug() ) ) ? ” : $template;
}
add_filter( ‘frontpage_template’, ‘prefix_front_page_template’ );
{{/gist}}