Add content in between product rows in WooCommerce archives
问题 I want to show some content after the third product (and maybe the sixth, ninth...) of a product category. Not every category has that extra content or the same amount of it. So it should be flexible. I found an example which uses the following code : <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'template-parts/content' ); ?> <?php if ( $wp_query->current_post == 1 ) { ?> <div>Put Ad Here</div> <?php } ?> <?php endwhile; endif; ?> I added that