Possiamo associare i nostri custom post type alle categorie di WordPress utilizzando una tassonomia specifica. Vediamo come fare.
Aggiungete il seguente codice al file functions.php
, ovviamente utilizzando il nome del vostro custom post type:
function reg_cat() {
register_taxonomy_for_object_type('category','CUSTOM_POST_TYPE');
}
add_action('init', 'reg_cat');