[Solved] Insert html after certain amount of posts?
You could use the following and it should do exactly what you want by checking the value of $loop->current_post. <?php $loop = new WP_Query( array( ‘post_type’ => ‘work’,’posts_per_page’ => ‘-1’ ) ); ?> <ul id=”carousel”> <li> <ul class=”inner-items”> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php if( $loop->current_post && !($loop->current_post % 6) ) : … Read more