Add Already Registered Custom Taxonomy to Custom Post Type in WordPress

August 8, 2014

development wordpress

If you have already defined your custom taxonomy in another plugin and want to use it in a custom post type that you might register in a second plugin, you'll need to add something like this in your custom post type definition. The register\_taxonomy\_for\_object\_type($taxonomy, $object_type)] function is quite nifty. I've also used it to enable the standard Category taxonomy on Pages.