How to *remove* a parent theme page template from a child theme?

I’m using the TwentyTen theme to create a child theme, but I can’t seem to get rid of the ‘One column, no sidebar’ page template that is in the TwentyTen parent theme.

I thought just copying it over and deleting the contents would do the trick, but it seems not. Does anyone know how to do this? I’m sure it’s very simple.

Thanks

osu

6

Overriding that template would be much easier than getting rid of it. Just the way logic goes.

I make no claim it’s efficient idea (late here), but this would get it nuked from edit screen:

add_action('admin_head-post.php','remove_template');

function remove_template() {

    global $wp_themes;

    get_themes();
    $templates = &$wp_themes['Twenty Ten']['Template Files'];
    $template = trailingslashit( TEMPLATEPATH ).'onecolumn-page.php';
    $key = array_search($template, $templates);
    unset( $templates[$key] );
}

Leave a Comment