Skip to content

Instantly share code, notes, and snippets.

@lukewhitehouse
Last active January 1, 2018 03:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukewhitehouse/6b26e5036d233e3d938f to your computer and use it in GitHub Desktop.
Save lukewhitehouse/6b26e5036d233e3d938f to your computer and use it in GitHub Desktop.
Remove Categories/Tags in WordPress

Remove Categories/Tags in WordPress

This code completely removes the category & tag taxonomies from WordPress which are available by default.

Instructions

Put this snippet within your functions.php within your WordPress theme.

<?php
/**
* Disable default taxonomies
*/
function mytheme_remove_taxonomies() {
register_taxonomy( 'post_tag', array() );
register_taxonomy( 'category', array() );
}
add_action('init', 'mytheme_remove_taxonomies');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment