<?php
function switch_page_template() {
global $post;
// Checks if current post type is a page, rather than a post
if (is_page())
{
// Checks if page is parent, if yes, return
if ($post->post_parent == 0)
return true;
else if ($post->post_parent != $post->ID)
{
$parent_page_template = get_post_meta($post->post_parent,'_wp_page_template',true);
$template = TEMPLATEPATH . "/{$parent_page_template}";
if (file_exists($template)) {
load_template($template);
exit;
}
}
}
}
add_action('template_redirect','switch_page_template');
/* Source: http://www.matrich.net/blog/wordpress/how-to-automatically-apply-parent-page-template-to-all-sub-pages-in-wordpress.htm */
?>