Honor the page template when a page is the home page but not also the front page. Props filosofo. fixes #15513

git-svn-id: http://svn.automattic.com/wordpress/trunk@16915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-14 15:45:19 +00:00
parent dfce49cf02
commit 14b8509961
1 changed files with 4 additions and 0 deletions

View File

@ -912,8 +912,12 @@ function get_date_template() {
* @return string
*/
function get_home_template() {
$template = get_post_meta( get_queried_object_id(), '_wp_page_template', true);
$templates = array( 'home.php', 'index.php' );
if ( ! empty( $template ) )
array_unshift( $templates, $template );
return get_query_template( 'home', $templates );
}