WordPress.org

Make WordPress Core

Ticket #15513: use-page-template-for-home-page-if-exists.15513.diff

File use-page-template-for-home-page-if-exists.15513.diff, 522 bytes (added by filosofo, 8 years ago)
  • wp-includes/theme.php

     
    912912 * @return string
    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' );
    916917
     918        if ( ! empty( $template ) )
     919                array_unshift( $templates, $template );
     920
    917921        return get_query_template( 'home', $templates );
    918922}
    919923