The WordPress codex provides extensive good examples of methods to join up custom taxonomies with custom publish types, however i could not find much about using built-in taxonomies (tags &lifier groups) with cpts.
I've got a cpt known as entries, and I have to add the conventional category and tag UI elements towards the listing cpt page. I should also do that with code during my functions.php, instead of utilizing a wordpress plugin.
No problem whatsoever. Whenever you register the publish type, just add this argument towards the array:
'taxonomies' => array( 'category', 'post_tag' )
Suppose you defined your cpt (custom publish type) through the following:
register_post_type('listings', $args); // where $args is an array of your cpt settings
Then you may make use of the following to include taxonomy:
// category-like: register_taxonomy('listing_category', array('listings'), array('hierarchical' => true, ...)); // tag-like: register_taxonomy('listing_tag', array('listings'), array('hierarchical' => false, ...);
Actually, Personally, i put individuals custom type definitions during my own wordpress plugin (not open for public because it provide my very own site benefits, which clearly not suit others whatsoever).
The issue of investing in functions.php boosts the difficulty to alter to a different theme (although altering theme isn't so frequently, however for self-possessed blog, it do take place in at some point).
Furthermore, the custom publish types ought to be site-wide, not with respect to the current theme. So semantically it shouldn't maintain the theme's directory.