Created
August 8, 2014 18:39
-
-
Save abrudtkuhl/54437529367925aa2bca to your computer and use it in GitHub Desktop.
Add Already Registered Custom Taxonomy To Custom Post Type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('init','add_categories_to_cpt', 200); | |
function add_categories_to_cpt(){ | |
register_taxonomy_for_object_type('search_tags', 'post_type'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 this in your custom post type definition.