The problem was with my archives.php file. I had added a couple of divs in part of the loop and put the closing tags at the end of the loop. Moving the closing tags into the loop after the endwhile statement fixed the problem.
Wrong code:
<?php /* Start the Loop */ ?>
<div class="child-pages grid">
<div class="grid-row">
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content-archive', get_post_format() );
?>
<?php endwhile; ?>
<?php motif_content_nav( 'nav-below' ); ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'archive' ); ?>
<?php endif; ?>
</div>
</div>
The fix:
<?php /* Start the Loop */ ?>
<div class="child-pages grid">
<div class="grid-row">
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content-archive', get_post_format() );
?>
<?php endwhile; ?>
</div>
</div>
<?php motif_content_nav( 'nav-below' ); ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'archive' ); ?>
<?php endif; ?>