Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya

hellofromtonya/bootstrap.php Secret

Created Jan 18, 2017
Embed
What would you like to do?
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