Created
February 21, 2015 11:22
-
-
Save chuckreynolds/f53acd21fd01f0420084 to your computer and use it in GitHub Desktop.
WordPress function to unregister a taxonomy.
This file contains 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 | |
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