Skip to content

Instantly share code, notes, and snippets.

@j-gardner
Last active August 16, 2016 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-gardner/cf8b098118613467dba39ff7f7dfddac to your computer and use it in GitHub Desktop.
Save j-gardner/cf8b098118613467dba39ff7f7dfddac to your computer and use it in GitHub Desktop.
Add Category Support to FAQ Post Type
<?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