• I have created a non-hierarchical custom taxonomy named place. When I create a post_tag term with the name abc, a term with ID n is created. If I then create a place term with the same name (abc), a term with the same ID (n) is created. When I change one term’s name or slug, the other term shows the changes I’ve made. When I change one term’s description, the other term does not show the change I’ve made and it maintains its own description. If I delete one term, the other stays and doesn’t get deleted.

    Checked in multiple cases. What’s going on?

    Here’s how I have declared the place taxonomy:

    // register place taxonomies
    function place_taxonomy() {
    	$labels = array(
    		'name'                       => 'Places',
    		'singular_name'              => 'Place',
    		'menu_name'                  => 'Places',
    		'all_items'                  => 'All Places',
    		'parent_item'                => '',
    		'parent_item_colon'          => '',
    		'new_item_name'              => 'New Place',
    		'add_new_item'               => 'Add New Place',
    		'edit_item'                  => 'Edit Place',
    		'update_item'                => 'Update Place',
    		'separate_items_with_commas' => 'Separate place names with commas',
    		'search_items'               => 'Search Places',
    		'add_or_remove_items'        => 'Add or remove places',
    		'choose_from_most_used'      => 'Choose from the most popular places',
    		'not_found'                  => 'Not Found'
    	);
    	$args = array(
    		'labels'                     => $labels,
    		'hierarchical'               => false,
    		'public'                     => true,
    		'show_ui'                    => true,
    		'show_admin_column'          => true,
    		'show_in_nav_menus'          => true,
    		'show_tagcloud'              => true,
    	);
    	register_taxonomy('place', array('video'), $args);
    }
    add_action('init', 'place_taxonomy', 0);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Same ID for two terms of different taxonomy with the same name’ is closed to new replies.