Last active
          December 20, 2015 17:02 
        
      - 
      
- 
        Save dboutote/aea60432b3b0ef585893 to your computer and use it in GitHub Desktop. 
    Adding Category Taxonomy Support for all WordPress Post-types
  
        
  
    
      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
    
  
  
    
  | <?php | |
| function add_category_support() { | |
| $post_types = get_post_types(); | |
| foreach ($post_types as $post_type) { | |
| register_taxonomy_for_object_type('category', $post_type); | |
| } | |
| } | |
| add_action( 'init', 'add_category_support', 99 ); | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment