Have you ever wondered about the best way to insert Adsense ads into your WordPress posts? Placing ads around your content is easy enough — just code it into your theme. But what about embedding them within your content?
While there are much fancier ways of doing this, my preferred approach is to use this simple little plugin (sorry, that link is dead so I removed it) that I ran across several years ago.
Simply upload the plugin, activate it, paste your Adsense code into the plugin file, and you’re ready to go. To insert an ad, simply use the following tag:
The way I’m currently using this here on jammer(six) is to write a short intro paragraph followed by the
<!--more--> tag. I then insert the
<!--adsense--> tag, and then pick up the writing with paragraph #2, as follows:
Text of paragraph #1…
Text of paragraph #2…
Text of paragraph #3…
And so on…
This means that, whenever a reader views individual page on your site, there will be an Adsense ad sitting between the first and second paragraphs.
If they start out on your front page, they won’t see this ad, but clicking on the ‘Read more’ pull up the remainder of the article including the ad.
Something else to keep in mind is that, while this plugin is intended to be a tool for inserting Adsense code, you can actually use it to insert any type of code into posts. The only downside is that you have to manually insert the tag. One nice touch, however, is that the plugin ads a button to the WordPress editor so you can insert the tag with a quick click while writing.