<?php
/*
Key = Position of the Ad
Value = The AdSense Banner Code
*/
$advertisements = array('3' => '<!-- adsense ad code 1 here -->',
'6' => '<!-- adsense ad code 2 here -->',
'9' => '<!-- adsense ad code 3 here -->');
$i = 1;
while (have_posts()) : the_post();
?>
<?php
if(array_key_exists($i, $advertisements)) {
// you can add custom HTML code here
echo $advertisements[$i];
}
$i++;
endwhile;
?>
There are currently 1 users browsing this thread. (0 members and 1 guests)