0
我希望把廣告代碼在我的主頁上每4個職位後,如何做到這一點(http://www.news.shreshthbharat.in/bharat)如何在每第n個帖子後創建廣告空間?
這裏是pastbin代碼http://pastebin.com/3vzhZKxE
我我現在正在使用此代碼:
`<?php if ($count==3) { ?>
<div class="clear"> </div>
<--- ad code or widget area- - - >
<div class="clear"> </div>
<?php } ?>
<?php $count = $count + 0; ?>`
使用此代碼,它會在第二篇文章後顯示廣告。
當然,你的意思是'1%4 = 1,2%,4 = 1,2,...,4%,4 = 0 '。 – Lstor
嗨請看看我的代碼http://pastebin.com/0u4Tg9Zd 此代碼工作,你可以定義 如果我需要改變每個位置?做什麼 $計數== 3 - [show_ads - 1] $計數== 7 - [show_ads - 2] $計數== 10 - [show_ads - 3] 我需要每個計數不同的廣告,這裏是我使用的代碼 '<?php if($ count == 3 || $ count == 7 || $ count == 10):?> 請看這個http:// wordpress。 org/support/topic/how-to-add-adsence-code-after-every-post-in-home-page?reply = 12 – user891988
@Lstor。 Oy公司。是。謝謝。會改變。 :-) –