You are limited to three Google Adsense adbolcks per page, so if you have the default 10 posts per page, and no Adsense in the sidebar.
Try after if have posts.
<?php $count=1; ?>
Then inside the loop (while have posts)
<?php if (!$count % 3 && $count < 10 ) : ?>
<div class="clear"> </div>
<?php dt_show_ads('position=Archives&before=<div class="adzone_b">&after=</div>&title=्ञ');?>
<div class="clear"> </div>
<?php endif; ?>
<?php $count++; ?>
HTH
David
thanks for reply
not working, i am confused, please help
i have paste my code here please if can look at this http://pastebin.com/PwWKJ5Jm
Not tested but checked and adjusted.
http://pastebin.com/kg263Kua
HTH
David
thanks David
i am giving you the test url
here is the cache of that page http://goo.gl/UuzyC
you’ll see the 468*60 ad showing after 2 post i
want to show after every 4 post
i upload your code & it showing error:
Parse error: syntax error, unexpected T_ENDIF in E:\HostingSpaces\shreshth\News.shreshthbharat.in\wwwroot\wp-content\themes\BharatNews\archive-default.php on line 34
Looking at the page layout you need the ads after posts 3. 9 and 15
(latest)
[ 01 ]
[02] – [03]
[ adBlock ]
[04] – [05]
[06] – [07]
[07] – [09]
[ adBlock ]
[10] – [11]
[12] – [13]
[14] – [15]
[ adBlock ]
Again: Un-Tested Code
http://pastebin.com/erYY79mq
HTH
David
Ok,
Found it a few lines above, third time lucky!.
Try http://pastebin.com/xsSMgWK4
HTH
David
error indicating this line – 57 <?php if ( $count == 3 $count == 9 || $count == 15 ) : ?>
line http://goo.gl/BilW6
<?php if ( $count == 3 $count == 9 || $count == 15 ) : ?>
Should be:
<?php if ( $count == 3 || $count == 9 || $count == 15 ) : ?>
David
thanks David ! finally it working now, thanks a lot for your great support
it’s done i knew it , thanks
is there any conditional way to change ad ?
like
$count == 3 – [ show_ads – 1 ] if i need different ad on this zone
$count == 7 – [ show_ads – 2 ] if i need different ad on this zone
$count == 10 -[ show_ads – 3 ] if i need different ad on this zone
<?php if ( $count == 3 || $count == 7 || $count == 10 ) : ?>