Recently I added AdSense ads to this WordPress site. At first I used Google’s own AdSense plugin which was good for just a quick setup but I quickly got annoyed with it’s limitations and bugs like so many of you others have. My main gripes were the limited selection of where you could place an ad, the bug(s) where it stops updating new ads or ad positioning and the fact that it creates a new ad unit every time you change something which quickly disorganizes your ad unit list.
So I switched to just manually editing the php files and inserting the ad code in them. Today I wanted to add a widget ad to the sidebar to replace my footer one and was scared away by the negative reviews for many of the alternative AdSense plugins to the Google one. So I dusted off my lacking PHP skills and created my own simple AdSense widget.
From the widget form you enter in your Publisher ID and the ID of the ad you want to use. You can also modify the max height and width allowed for responsive ad units. Along with seperate max width and height fields for both mobile and desktop viewers.
And you can see it in action in the sidebar to your right 🙂 —>
I put it up on GitHub and you can grab it here.
To install simply drop the aardvark-adsense folder into your plugins folder and then activate it from the WordPress Plugins UI. I’ll likely put it up on WordPress’s plugins listing when I polish the plugin up more.
Thank you for reading!!