Created
August 6, 2018 21:54
-
-
Save aguilar1181/874f56dfe28f33e44edbc4f9392e29f4 to your computer and use it in GitHub Desktop.
use this on a child theme functions to disable custom post types created by pre-made themes
This file contains 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 | |
//Unregister post type | |
function delete_post_type(){ | |
unregister_post_type('custom_post_type_name'); | |
} | |
add_action('init','delete_post_type', 100); //priority has to be higher than the register action |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment