-
-
Save hellofromtonya/dc8cfa8f308cf3dbc6a81efa36aff434 to your computer and use it in GitHub Desktop.
Exploring all of the taxonomies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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