Last active
August 29, 2015 14:13
-
-
Save jlavoie13/c695ece702183e34fc2d to your computer and use it in GitHub Desktop.
Remove Post Categories & Tags
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
add_action( 'init', 'post_cat_taxonomy_cleanup', 11 ); | |
function post_cat_taxonomy_cleanup() { | |
global $wp_taxonomies; | |
$wp_taxonomies['category']->object_type = array_diff( $wp_taxonomies['category']->object_type, array( 'post' ) ); | |
} | |
add_action( 'init', 'post_tag_taxonomy_cleanup', 11 ); | |
function post_tag_taxonomy_cleanup() { | |
global $wp_taxonomies; | |
$wp_taxonomies['post_tag']->object_type = array_diff( $wp_taxonomies['post_tag']->object_type, array( 'post' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment