Skip to content

Instantly share code, notes, and snippets.

@walterebert
Last active November 10, 2015 10:18
Show Gist options
  • Save walterebert/447c6a5eed1d4b8911e3 to your computer and use it in GitHub Desktop.
Save walterebert/447c6a5eed1d4b8911e3 to your computer and use it in GitHub Desktop.
WordPress snippet: Unregister common taxonomies
<?php
function my_unregister_taxonomies()
{
unregister_taxonomy_for_object_type( 'category', 'post' );
unregister_taxonomy_for_object_type( 'category', 'pages' );
unregister_taxonomy_for_object_type( 'post_tag', 'pages' );
}
add_action( 'init', 'my_unregister_taxonomies' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment