Removing the Categories and Tags Taxonomies in WordPress

As your WordPress site grows, you will discover that you need more ways to organize your contents. The default Categories and Tags taxonomies are good, but you need more than two taxonomies and you want them to be more descriptive. If you want to create custom taxonomies for your website, the article Manually Creating Custom Taxonomies in WordPress is a good read. If you have read that article and you want to implement what you have learned from it and get rid of the Categories and Tags taxonomies altogether in favor of taxonomies that are more suitable to your website type, read on.

An Important Reminder: Always make a backup of your site or taxonomies before making any changes to your website structure.

To remove the Categories and Tags taxonomies from the WordPress Admin panel, open the functions.php file of your WordPress site and write in it the following lines of code:

// Remove Categories and Tags from Admin panel
add_action('init', 'remove_default_taxonomy');
function remove_default_taxonomy() {
    register_taxonomy('category', array());
    register_taxonomy('post_tag', array());
}

While the functions.php file is still open, add to it the bits of code below to remove the Categories and Tags widgets from the WordPress dashboard:

// Remove Categories and Tags from widgets
function remove_default_widgets() {
	unregister_widget('WP_Widget_Categories');
	unregister_widget('WP_Widget_Tag_Cloud');
}
add_action( 'widgets_init', 'remove_default_widgets' );

The two groups of code above do not totally remove the Categories and Tags taxonomies from your WordPress installation. They can still be accessed by plugins that deal with taxonomies.