I assume, moving from Roots to Sage,
archive.php has been ditched to make more it more KISSable. So, now there’s just the
index.php for Archives. That’s fantastic. However, when creating a custom post type, and specifying has archives to the CPT, a somewhat endless loop occurs. It repeats a single post over and over again.
Changing this line…
<?php get_template_part('templates/content', get_post_type() != 'post' ? get_post_type() : get_post_format()); ?>
<?php get_template_part('templates/content', get_post_format()); ?>
…makes it all better.
I’m guessing the intended function checks for custom posts as well and includes them with the
Otherwise, the reason why it’s not looping correctly is due to a user error—me.