How to get the singular name of a custom taxonomy?

EDIT Since I missunderstood your question at first, here’s the update that should do what you want. $taxonomies = get_object_taxonomies( ‘my_post_type’, ‘object’ ); foreach($taxonomies as $tax){ echo $tax->labels->singular_name; } Basically, you need to specify to the get_object_taxonomies function that you want an object to be returned. In your function, I’m not sure where the $args … Read more

get post type plural

Edit: get_post_type_labels was never intended to be a public function. It is only used internally when registering a post type. See these trac tickets: get_taxonomy_labels() and _get_custom_object_labels() fail if $object->taxonomy is not array Fatal error: Cannot use object of type stdClass as array in /…/wp-includes/post.php on line 1202 Like you mentioned in your question you … Read more