Lego2012
12/13/2016 - 4:54 PM

Remove Archive and Blog Page templates

Remove Archive and Blog Page templates

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

/**
 * Remove Genesis Page Templates
 *
 * @author Bill Erickson
 * @link http://www.billerickson.net/remove-genesis-page-templates
 *
 * @param array $page_templates
 * @return array
 */
function be_remove_genesis_page_templates( $page_templates ) {
    unset( $page_templates['page_archive.php'] );
    unset( $page_templates['page_blog.php'] );
    return $page_templates;
}
add_filter( 'theme_page_templates', 'be_remove_genesis_page_templates' );