Created
April 16, 2017 20:52
-
-
Save douglasanro/adb65b43da6f3b890ea2e8ff652fdc99 to your computer and use it in GitHub Desktop.
Disable built-in post type from WordPress
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 | |
/* ---------------------------------------------------------------------------- | |
* Disable built-in post type | |
* ------------------------------------------------------------------------- */ | |
add_action( 'init', 'simple_remove_default_post_type', 1 ); | |
function simple_remove_default_post_type() { | |
register_post_type( 'post', array( | |
'map_meta_cap' => false | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment