Skip to content

Instantly share code, notes, and snippets.

@jlavoie13
Last active August 29, 2015 14:13
Show Gist options
  • Save jlavoie13/c695ece702183e34fc2d to your computer and use it in GitHub Desktop.
Save jlavoie13/c695ece702183e34fc2d to your computer and use it in GitHub Desktop.
Remove Post Categories & Tags
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