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
This commit is contained in:
parent
1da4d8e087
commit
ccd108bd5e
@ -912,8 +912,12 @@ function get_date_template() {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_home_template() {
|
function get_home_template() {
|
||||||
|
$template = get_post_meta( get_queried_object_id(), '_wp_page_template', true);
|
||||||
$templates = array( 'home.php', 'index.php' );
|
$templates = array( 'home.php', 'index.php' );
|
||||||
|
|
||||||
|
if ( ! empty( $template ) )
|
||||||
|
array_unshift( $templates, $template );
|
||||||
|
|
||||||
return get_query_template( 'home', $templates );
|
return get_query_template( 'home', $templates );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user