0
我想插入谷歌广告每5个职位在我的WordPress的网站与无限滚动。谷歌AdSense不会出现在一个PHP循环
这是我使用的每5个职位循环
<?
if (have_posts()) : $count = 0; while (have_posts()) : the_post();
//before
if (($count>1) && ($count%5 == 0)){
?>
<!-- AD_HP_RC-2 -->
<div id="adsbetween">
<div id='div-gpt-ad-xxxx-0' style="width:300px; height:450px; display:inline-block; float:right;">
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-xxxx-0'); });
</script>
</div>
</div>
<?
}
$count++;
第一个广告加载罚款之间,但是从第二个广告,它只是空的空间,添加谷歌的广告代码。
我在我的网站中使用dfp,因此在这种情况下允许超过3个Google广告。
这是网站网址:http://bluehandwebdesign.com/dev/hk/
能否请你帮我在这?
也。尽量不要使用短php标签 – 2014-09-05 15:40:20