Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adding Category Taxonomy Support for all WordPress Post-types
<?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
You can’t perform that action at this time.