Let's say I have a Custom Post Type with the slug books
. The label is Readings
and the singular label is Reading
.
I want to display the Custom Post Type label in one of the custom post type's post. How can I achieve that?
If I want to display a page title from its slug, I can use
echo get_the_title(get_page_by_path('other-page-slug'));
But I haven't found a clue to do this with custom post type.
get_post_type_object
codex.wordpress.org/Function_Reference/…