Has anyone ever seen on some blogs (like John Chow) where the 300x250 ad block only shows up on the first two posts, and then again on single pages and the RSS feeds? They can also rotate these ads as well. How are they doing that? Is there a plugin for it? I thought they might have been using Adsense Deluxe but this seems to be far more sophisticated. Any help appreciated.
Use the following code <?php if( is_home() && ($post == $posts[0] || $post == $posts[1]) ) :?> ~ GOOGLE AD CODE HERE ~ <?php endif; ?> PHP:
Thanks for the advice. I actually ended up going much further than that by installing the Adsense Deluxe plugin. Don't let the name fool you, you can use just about any kind of ad code here. Instead of putting in typical Google Adsense code, I installed Openads and used that adserver script to set up new zones. I created a 300x250 zone and used the generated code in Adsense Deluxe. This created the 300x250 blocks I was looking for. I then placed the relevant PHP code in my WordPress template, then edited the plugin file so it only shows a maximum of 2 ads on the front page. The net result is two 300x250 ads are embedded in the first two posts on the front page of my blog, one is shown on every single post, and it's also shown in RSS feeds, all controlled by one zone in Openads. I hope that's how the A-list bloggers pretty much did it too. God forbid they should reveal just a little about how they set up their own ad zones though. F---ing snotboogers.