From ccd108bd5ee22e18465f95fc5ee37c9d2c3d269c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 14 Dec 2010 15:45:19 +0000 Subject: [PATCH] Honor the page template when a page is the home page but not also the front page. Props filosofo. fixes #15513 git-svn-id: https://develop.svn.wordpress.org/trunk@16915 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index efff2c6f54..420a6844ea 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -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 ); }