Created
January 7, 2017 20:22
-
-
Save nucab/876d730bf34d2ffbd6e9dc0e028c2995 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'theme_page_templates', 'child_theme_remove_page_template' ); | |
/** | |
* Remove page templates inherited from the parent theme. | |
* | |
* @param array $page_templates List of currently active page templates. | |
* | |
* @return array Modified list of page templates. | |
*/ | |
function child_theme_remove_page_template( $page_templates ) { | |
// Remove the template we don’t need. | |
unset( $page_templates['template-full-width.php'] ); | |
return $page_templates; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment