Developing my first custom theme and I started out using an individual page-$slug.php to display a list of each custom post. Have since learned that archive.php is better for this purpose (but I just want to use one if possible).
So in admin I’ve changed the links to the ‘post type archive’ instead of the page I’d created, and set has_archive to true for each cpt.
But the link now takes me to index.php
My archive.php so far is just this:
while (have_posts()): the_post();
How do I get it do use the archive.php template and output just the posts of the requested type?
Thanks in advance!
Read more here:: Why is my site using index.php instead of archive?