I’m a generally experienced WP developer and so this issue is rather confusing. Normally when I have posts that are repeating too often, there’s an obvious error somewhere. This time, it’s very unclear to me:
In my archive-post-type.php file I have:
`<?php`
`get_header(‘clean’);`
`?>`
`<?php`
`if ( have_posts() ) {`
`while ( have_posts() ) {`
`the_post();`
`get_template_part( ‘template-parts/content’, get_post_type() );`
`} // end while`
`} // end if`
`?>`
`</main><!– #main –>`
`<?php`
`get_footer();`
This produces duplicates. In other words, instead of seeing one post, I see two. I can not tell why.
[ad_2]