Last active
August 16, 2016 15:39
-
-
Save j-gardner/cf8b098118613467dba39ff7f7dfddac to your computer and use it in GitHub Desktop.
Add Category Support to FAQ Post Type
This file contains 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 | |
// Add the following to your theme's functions.php file | |
add_action( 'plugins_loaded', 'add_categories_to_cpt', 15 ); | |
function add_categories_to_cpt(){ | |
register_taxonomy_for_object_type( 'category', 'faq'); | |
// 'faq' can be changed to any registered post type | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment