WordPress.org

Make WordPress Core

Changeset 16915


Ignore:
Timestamp:
12/14/10 15:45:19 (5 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r16900 r16915  
    913913 */ 
    914914function get_home_template() { 
     915    $template = get_post_meta( get_queried_object_id(), '_wp_page_template', true); 
    915916    $templates = array( 'home.php', 'index.php' ); 
     917 
     918    if ( ! empty( $template ) ) 
     919        array_unshift( $templates, $template ); 
    916920 
    917921    return get_query_template( 'home', $templates ); 
Note: See TracChangeset for help on using the changeset viewer.