There is a million ways to put up ads on your site, as well as a myriad of tools and plugins with the sole purpose of placing ads.

I will tell you how I have done it when I was just getting started making money online, and how I do it now.

10 years ago, when I started using AdSense, I would copy and paste ad code directly into HTML of my static sites, and later into “post editor” of my WordPress blogs. This is a very ineffective and slow process, if you deal with more than 5 page websites. Imagine having to change one ad on 100 WordPress posts manually 🙂

Today I do it all using my own WP Adsense plugin, which I developed, because there aren’t any good alternatives!

Here is how it went down:

Early days of AdSense on WordPress

In 2010-2011, when I switched all my sites to WordPress, I tried a couple of plugins, but the results were much less than acceptable.

Ads would overlap / overflow text, images or contact forms, and would be displayed in completely inappropriate places, or on pages where I did not want them (contact us, about, home page, etc).

Moreover, I couldn’t control this behavior, because plugins were very primitive, and built by developers, who did not understand Adsense optimization and placement!

Seeing how broken all the plugins were, I started to learn PHP and WordPress theme design, and began placing ad code into WP theme templates. For example, above and below the_content(); function, which would display ads above ad below page/post content.

AdSense and MOBILE

This worked until the “mobile revolution” came about. At that time, old static (non-responsive) WP themes with ads on them began to look completely out of whack:

AdSense on non optimized mobile site

To deal with this problem, (around 2013) I purchased WPtouch pro plugin (ver. 2) for $79, which worked ok. However, it took enormous time to place mobile ads on my sites (modifying WPtouch theme files). I now could run 2 themes – one for desktop & one for mobile, with their own sets of device specific ad units.

Then version 3 came out, which was a $39 upgrade – I purchased that one as well, and as a result everything stopped working. I never figured out how to fix it, and after wasting 50+ hours & $128 I gave up on it.

WPTouch out – enter Jetpack Mobile Theme (Minileven)

Fortunately, I discovered the WP JetPack plugin, which had a mobile theme (minileven), and automatic switching between Desktop and Mobile designs (this doesn’t work for tablets/iPads).

I was ecstatic – JetPack mobile theme worked great, was fairly easy to modify and place ads, and actually looked pretty good! This carried me through 2015.

The only problem was when you upgraded JetPack plugin, it would overwrite Minileven, with all my modifications, and all ads would be gone! The only way to deal with this, was to back up Minileven folder, update Jetpack, and then restore backup files.

By 2015-2016, I had too many websites, and “upgraded my ad insertion system” to having a bunch of ad template files, and calling them inside theme templates using PHP include functions.

This system worked very well, but once again was not efficient. Every now and then, I would overwrite the Minileven folder, and would have to restore from backups, losing some of the changes made in the process.

With the rise of “Responsive WP Themes” I no longer needed the JetPack Minileven mobile theme. I no longer needed 2 themes, and 2 sets of ads for mobile/desktop. I could use one theme!

Now the problem was how to show smaller mobile ads & bigger desktop ads in the same spot? I tried responsive ads and got very disappointed with the results.

So I set out to build a system (in PHP) which would recognize the device, and serve up the appropriate ad size. I ended up creating this free PHP mobile ads script (which you can use on any WP or PHP site with some coding).

The video below will demonstrate exactly how I did all of the above, and how you can do it like a pro, if you don’t want to use a plugin:

Creating of AdSense Ninja plugin for WordPress

I once again researched available WP Adsense plugins, and quickly confirmed – they were still just as bad as 5 years earlier!

I’ve had enough of this madness! I had to make my own plugin, so I could integrate adsense quickly, in the right places, and have full control to show or hide ads on specific posts/pages. It would also enable me to do automatic MOBILE ads switching and even AB Testing!

Here is how the early version of plugin looked:

In early days, it wasn’t even a plugin, but rather an extension that I could drop into any WP Theme. Later, I converted it into a full-blown plugin, and now any blogger / WP publisher can use it!

Today, AdSense Ninja plugin is a full featured ads implementation and AB testing platform for small and medium size blogs/websites running on WordPress. You can get my plugin with 1, 5 and unlimited websites license.

However, I understand the needs of larger publishers / ad agencies, as I deal with these issues every day. As a result, I am now developing more advance features for complex WP based portals.

Single site
Increase CTR & RPM
Optimized for Mobile
A/B Testing
Easy to Use
Ads in WP Comments
Buy Now >
Unlimited sites
Increase CTR & RPM
Optimized for Mobile
A/B Testing
Easy to Use
Ads in WP Comments
Buy Now >

1 Comment

  1. Nice and amazing plugin. Thanks


Leave a Reply

Your email address will not be published. Required fields are marked *