Get custom post type slug for an archive page
How do I discover the custom post type slug when I’m on an archive page? For instance if /products/ fires the archive-products.php template, how (pragmatically) do I get the post type slug? Thanks 7 To get the current post type use get_post_type(). Then ask get_post_type_object() for all the data you need, for example the slug: … Read more