How best to inject ads between posts in the loop?

Probably just add a counter, show ad on multiples of 6.

Something like

$count = 0;
$adEvery = 6;

if (have_posts()) :
    while (have_posts()) : the_post();

        // Individual Post

        $count++;
        if ($count%$adEvery == 0) { 
            // your ad
        } 
    endwhile;
else :
    // No Posts Found
endif;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)