For the site I am making, I have a few post types: News, Events, Projects, Placements. Each one of these post types will need its own archive page, accessible through the navigation. I am able to create these post types using the Types plugin, but my question is how do I create a archive page for them? I can’t figure out what the URL will be. /projects
for the post type with slug projects
gives me nothing.
I think I understand how the templates for custom post types work (archive-{post-slug}.php
), but I don’t know how to make these pages accessible.
When a post type is registered, you need to at least set
has_archive
to true. This will use the post type name as the slug for archive. You can also specify a string representing the slug forhas_archive
:This should be accessible under Type’s advanced settings, according to their documentation.