Once you decide to include some advertisement program (like Google Adsense or Yahoo Publisher) in your blog, two problems may appear:
* Your usual visitors may find the ads appearing in your posts annoying, disturbing and useless. They come to see what you have written and not to be distracted by ads. On the other hand some friends may think they do you a favour by clicking the ads, while this is forbidden by most advertisement policies.
* Possibly the content of some of your posts is beyond the policies of the company that provides the ads. They usually donâ€™t allow ads to be published in websites that have mature content, for example.
The plugin that I present here helps solving this two problems.
On the one hand, the code that presents the ads is not embedded in the pages of individual posts that have been published in the last N days, being N a paramenter set by the user in the plugin options. It is statistically proved that, as a general rule, usual visitors of your blog only visit the main page and the most recent posts. So I recommend not to put advertisement code in the main page, and use this plugin to embed code in individual posts, setting the â€œlast daysâ€ parameter to the maximum days you expect youir usual visitors to return to your blog. In my case, I think one week is fair enough, and that is why 7 days is the default value.
On the other hand, certain posts may overcome the policies of the advertisement program you are using. This is the case, for example, for Google Adsense and mature content. If posts with adult content are the exception in your blog, it may be quite hard to embed the code in each one of your general purpose posts, just to avoid the adult oriented ones, instead of putting the code just in the single.php code. This plugin allows to write down a list of posts IDs that will exceptionally not contain advertisements.