A short tutorial on using the WhyDoWork Adsense Plugin, since I’ve received a couple of questions over time.

What it can be used for:

  • inserting either Adsense ads, or anything else really into posts. You can insert Adsense, YPN, CPM banners or buttons, a box with your top or favorite posts to bring them to the attention of your users
  • controlling when the ads show and how. You can use no ads on the blog on article pages while they’re new, and you can set it up to start displaying ads once a certain period of time passes (you decide after how much time).
  • block ads from showing on certain pages or articles. For example, you may have a page where you want ads, but you might prefer that your About, Contact or Advertise Here pages are ad free. Another use is for paid reviews, which usually ask you not to have ads in those pages.


Set Code #1-10

The plugin can remember 10 different codes that you might want to insert in your blog. Paste the Adsense code in the box, then either set it up where you want to appear below, or if you want to paste a second code, scroll all the way down, click Save, then click on Code #2 and paste another code. Don’t forget to save before you click on another Code area, or the code you just inserted will be lost.



It inserts your code in the admin page to show you how it would look like. I’m seriously considering removing this in future versions, because most people probably don’t read the entire plugin page and don’t realize that it shows their real ads. DON’T CLICK ON THEM!

Exclude posts and/or pages

You can choose not to display ads in certain posts or pages. Either because ads are not appropriate there (About, Contact, Advertise Here pages) or because you’re not allowed to have ads in paid reviews (the case for PayPerPost I think).

For this, go to the Manage page in your admin area, and see what ID do the posts or pages that you want blocked have. Enter those ID’s in the Exclude box, separated by commas and Save.


Displaying ads on the front page, categories, archive and tag pages

You can insert a maximum of 3 ads on these pages (the maximum allowed by Adsense), and you have drop-down boxes for each of them.

Code # – click and select the code you want inserted for that particular position

Alignment of Ads – choose where you want that particular code to be displayed (ad positions explained below)

Show to post number – choose where you want that particular code and alignment to be used in the page (posts 1-10)

Example of use: Code 1 at the Top of Post 1, Code 3 at the Bottom of Post 1, Code 2 at the Top of Post 3

Displaying ads in pages and single pages

The only difference from the front page example is that you’re missing the Post Number option. Other then that, its the same. Choose the code that you want to display and in what position.

Please take into account your typical post length and image positions when choosing the place and size of the ads, otherwise you might end up with a bad look for your article.

Single Page (older then X days)

Here you can choose to display a different ad setup for older posts, so you don’t annoy your regular visitors. Usually only search engine visitors come on a regular basis to old posts and now you can monetize those visits better by inserting more aggressive ads.

If there is any code selected in this area, then it will display this configuration to article pages once they turn the age from the box below. If you don’t select a configuration for this section, then all the posts use the setting you decided for the pages and single pages previously.


Ad Positions

Top – inserts the code between the title and the content

Top Left and Top Right – inserts the code in the top part of the content, surrounded by text

Middle – inserts the code in the middle of the post, between two paragraphs. Middle means here that it sees how many paragraphs there are in a post, then divides it by two and inserts the ad there. For example, in a 12 paragraph story, it will insert it after the 6th paragraph. You need at least 2 paragraphs in a post for the middle positions to display.

Middle Left and Middle Right – inserts the code in the middle of the post, surrounded by text. It actually inserts it in the top part of the second half of the post, so it might seem closer to the bottom.

Bottom – inserts the code below the content

Random – cycles the selected code among the positions that are not occupied by other ads. In order for the random setting not to use a position assigned to a fixed ad, you will need to insert the random one to the last setting in use.

Example: if you want to have a top left ad all the time and another one in random position, select first the fixed position, then the random one, like in the example pic below:


As you can see, I’ve got two ads for articles in this example, the random being the last one to be inserted. That’s because it checks where the previous ad was inserted, so it doesn’t use that position.

You can see how random works by selecting an ad and refreshing the page where it is inserted. You should see it in different positions every time.

If you enjoyed this post, make sure you subscribe to my RSS feed!