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.




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:


function remove_template() {

    global $wp_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