Skip to content

Instantly share code, notes, and snippets.

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