Wordpress: Disable Tags only for Posts Wordpress: Disable Tags only for Posts wordpress wordpress

Wordpress: Disable Tags only for Posts


As of WordPress 3.7, there is an unregister_taxonomy_for_object_type function available for just this sort of thing.

In your case:

// Remove tags support from postsfunction myprefix_unregister_tags() {    unregister_taxonomy_for_object_type('post_tag', 'post');}add_action('init', 'myprefix_unregister_tags');

View the documentation for this function here.


Paste this code into your functions.php

add_action( 'admin_menu', 'myprefix_remove_meta_box');function myprefix_remove_meta_box(){   remove_meta_box( 'tagsdiv-post_tag','post','normal' );}

tags meta box has a class of tagsdiv-post_tag, so this will remove the tags meta box

OR

add_action('init', 'remove_tags');function remove_tags(){    register_taxonomy('post_tag', array());}

if you completely want to remove it