edisplay
4/24/2014 - 7:52 AM

Remove page templates from dropdown page attributes in WordPress ( >= 3.9 )

Remove page templates from dropdown page attributes in WordPress ( >= 3.9 )

<?php 
add_filter( 'theme_page_templates', 'rrwd_remove_page_template' );
    function rrwd_remove_page_template( $pages_templates ) {
    unset( $pages_templates['page_blog.php'] );
    unset( $pages_templates['page_archive.php'] );
    return $pages_templates;
}

?>