Display custom post type from template
If you want to use the proper archive page (e.g. example.com/events), make sure that you register your custom post type with ‘has_archive’ => true and then create an archive-events.php in your theme (changing events to whatever you’ve named your CPT). To show just the latest post, put the following before you call your loop stuff: … Read more