Hello, I am using below given code in index.php at my blog for displaying 3 ads + 3 text ads (google ads). <?php if($postcount<4) { include (TEMPLATEPATH . "/adsense-links.php"); include (TEMPLATEPATH . "/adsense300x250.php"); } ?> Code (markup): But still getting blank space on 4th post. why ? Anyone help me out of this problem ? DON.
Where is this mystery blog with the phantom ads? I'd guess that $postcount starts at zero to give four containers, but something else is stopping more than three ads from showing. I dunno, try changing 4 to 3 and see what happens.
I have done that but no changes at all. Anyway just found solution for that. Now i am using below given. <?php if ($wp_query->current_post < 3) { include (TEMPLATEPATH . "/adsense-links.php"); include (TEMPLATEPATH . "/adsense300x250.php"); } ?> Code (markup): And it works DON.
That is because google allows only 3 ads and 3 links per page, source - https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=9735
I know that very well. And btw i have asked that why 4th post space is blank evenif i have entered < 4 in code itself. Anyway my problem already solved as you can check it. http://forums.digitalpoint.com/showthread.php?t=1951662&p=15026434#post15026434 DON.