$i = 0;
while(have_posts() ) :the_post(); $i++;
if($i == 5) {
echo 'reklam';
}
endwhile;
böyle bir şey çözmeli..