get_taxonomies – return ID and slug

I am using get_taxonomies to return a list of all of the taxonomies for a custom post type like this..

$taxonomy_args = array(
‘public’ => true,
‘object_type’ => array (
‘my_custom_post_type’
),
);
$taxonomies = get_taxonomies( $taxonomy_args, ‘objects’ );

This is working correctly, but I am trying to also return the slug and ID for the taxonomies

Can this be done using get_taxonomies or is there a more appropriate function to use?

Read more here:: get_taxonomies – return ID and slug

Leave a Reply

Your email address will not be published. Required fields are marked *