I have a custom post type (rezept
that I added a custom taxonomy Allergiefrei
to. I got this working so far. Adding terms to the custom taxonomy’s box works, too, but autocomplete and ‘Choose from the most used tags’ only shows “0”.
Here’s the code where I register the custom taxonomy:
function register_rezept_taxonomies() {
register_taxonomy(
'Allergiefrei',
'rezept',
array(
'label' => 'Allergien',
'rewrite' => array('slug' => 'allergien')
)
);
}
add_action('init', 'register_rezept_taxonomies');
I’m defining custom taxonomies and the post type in a plugin.