Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Created February 21, 2015 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuckreynolds/f53acd21fd01f0420084 to your computer and use it in GitHub Desktop.
Save chuckreynolds/f53acd21fd01f0420084 to your computer and use it in GitHub Desktop.
WordPress function to unregister a taxonomy.
<?php
add_action( 'init', 'unregister_taxonomy_taxname');
function unregister_taxonomy_taxname(){
global $wp_taxonomies;
$taxonomy = 'post_tag'; // tax slug to remove
if ( taxonomy_exists( $taxonomy))
unset( $wp_taxonomies[$taxonomy]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment