While putting this site together, I ran into an issue where some of the Google Adsense ad units were not displaying. They were all using the same code, so as such I was baffled. What I observed was that all ads would display on the individual post pages (single.php), but some were missing on the main page (index.php).
I found my answer and figured I’d post it here in case anyone else runs into the same issue.
From the Adsense Terms & Conditions:
AdSense offers a number of ad formats and advertising products. Publishers are encouraged to experiment with a variety of placements, provided the following policies are respected:
- Up to three ad units may be displayed on each page.
- A maximum of two Google AdSense for search boxes may be placed on a page.
- Up to three link units may also be placed on each page.
- Up to three referral units may be displayed on a page, in addition to the ad units, search boxes, and link units specified above.
- AdSense for search results pages may show only a single ad link unit in addition to the ads Google serves with the search results. No other ads may be displayed on your search results page.
- No Google ad or Google search box may be displayed in a pop-up, pop-under, or in an email.
- Elements on a page must not obscure any portion of the ads.
- No Google ad may be placed on any non-content-based pages.
- No Google ad may be placed on pages published specifically for the purpose of showing ads, whether or not the page content is relevant.
What I had done was add an ad unit to The Loop so that it would display after each post summary on the main page. This worked fine when I first tried it as the site had less than 2 posts. Once I got to the third post, ad units started disappearing as Google will not display more than 3 ad units on a page.
Once I removed the ad code from the end of each post, the issue went away immediately. Hope this helps you if you have the same issue.