Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya
Created January 18, 2017 04:26
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 hellofromtonya/dc8cfa8f308cf3dbc6a81efa36aff434 to your computer and use it in GitHub Desktop.
Save hellofromtonya/dc8cfa8f308cf3dbc6a81efa36aff434 to your computer and use it in GitHub Desktop.
Exploring all of the taxonomies
add_action( 'init', __NAMESPACE__ . '\test_getting_taxonomies', 9999 );
function test_getting_taxonomies() {
register_taxonomy('genre', 'post', array(
'label' => 'Genre',
'hierarchical' => true,
));
register_taxonomy_for_object_type( 'category', 'page' );
if ( is_admin() ) {
return;
}
$args = array(
// '_builtin' => true,
);
$taxonomies = get_taxonomies( $args, 'objects' );
ddd( $taxonomies );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment