AdSense Widget for WordPress Sidebar

April 1st, 2006

WordPress PluginsThis is a Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in.

However, as a loyal reader has lovingly pointed out, if you want AdSense or any other kind of JavaScript component added to your sidebar all you need to do is paste it inside the standard Text Widgets that come built-in with Automattic's Sidebar Widgets plugin!

Unbelievably easy! And all this work for nothing. However, for fun I have left the original plugin up here in case you were interested in how I made the plugin.

Thanks to the people at Automattic, it is easy to install and requires no coding or template modification.

The Color, size and h2 title of your AdSense widget are all fully customizable from within the WordPress Presentations tab. No joke!

Requires:

Wordpress Sidebar Widgets Plugin

Download:

wp-widgets-adsense.zip

Here are the installation instructions...

Installation:

  1. Unzip and upload to your /wp-content/plugins/ directory
  2. Activate the plugin from inside WordPress (Plugins tab)
  3. Drag AdSense widget to your sidebar from inside WordPress (Presentation tab > Sidebar Widgets)
  4. Click the configuration icon and enter your google_ad_client ID
  5. Optional: customize the color, size, and sidebar h2 title

That's it! Enjoy.

In our daily life computers and software have gained integral position. Most of our professions are unimaginable without computer software running at its core. In last decade software industry has become the largest of all. Especially the web hosting business has flourished with the internet. Many cheap webhosting services are available to overcome digital divide created by this rapid advancement. As an effect of this growth a webhost firm is now under much pressure to provide quality services to large spectrum of clients.

Posted in:

334 Responses to “AdSense Widget for WordPress Sidebar”

  1. James Webster (not verified) Says:

    Great! It would be even more powerful if it could be configured to not show ads depending on the current referred; eg. only show ads to people who have been referred by a website.

  2. Sean (not verified) Says:

    Everything looks good, but seems to break under PHP5. It's the array_merge() function, which broke a couple of my scripts when upgrading. I had to change line #78 from: $options = array_merge(widget_adsense_options(), get_option('widget_adsense')); to: $wadsense = get_option('widget_adsense'); $options = array_merge(widget_adsense_options(), array($wadsense)); And then everything worked fine. - Sean

  3. AdSense Widget for Wordpress - SendMeHateMail (not verified) Says:

    [...] I was just about to start building an AdSense widget for Wordpress and thought I should take a quick look on the web to see if anyone beat me to the punch.  Sure enough, Mike Smullin did.  If you are looking for a clean and easy AdSense widget, this is the one to get. [...]

  4. Gunnar (not verified) Says:

    Hi The widget works fine, but it won't work when I have the Adsense-Deluxe (http://www.acmetech.com/blog/adsense-deluxe/) plugin activated. Any solution? G

  5. mikesmullin Says:

    Google limits you to a maximum of 3 AdSense blocks on a single page. If you embed AdSense code into your templates, this counts against the 3 unit maximum, and sometimes Google simply doesn’t have enough ads for your content, so you’ll get empty space in your pages unless you use AdSense’s features for showing alternate ads or folding the empty blocks. If my plugin doesn't work, try using those Text Widgets I mentioned above, instead. Also remember: the more AdSense ads you display on the page, the cheaper ads you get.

  6. WordPress Widgets » Blog Archive » AdSense (not verified) Says:

    [...] Mike Smullin also made an AdSense widget. While it’s already possible for self-hosted blog admins to paste AdSense code into a Text widget, this might be a little bit nicer as it lets you customize color, size and title from the widget panel. [...]

  7. Google Adsense Tips and Tools Collection « Quick Onlin (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in. [...]

  8. iznan (not verified) Says:

    your widget rawks......

  9. henry (not verified) Says:

    i'm getting this error when i put the adsense widget into the sidebar Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /wp-content/plugins/widgets/adsense.php on line 78 Warning: Invalid argument supplied for foreach() in /wp-content/plugins/widgets/adsense.php on line 96

  10. jazzle (not verified) Says:

    Works great for me, but right now the ads are showing in Spanish!

  11. 简单 · 关于Widgets (not verified) Says:

    [...] 一些widget About Me:这个应该不错 Picasa Web Matrix widget:加上google的picasa相册 Daiko’s Video Widget在侧栏增加一个google video播放器 AdSense widget:可以自定义AdSense Chip’s new widget:通过调用一个opml文件来显示你的blogroll[可能会减慢页面载入速度] useronline:在线访客情况,不知道这个版本能否正常显示。 Word Stats:统计每篇日志的字数和总字数。 gabbly widget:加上gabbly的聊天窗口。 Drop Down Archives:将存档以下拉方式显示。 Accessibility Widget:让访客可以选择浏览字体大小。 coComments widget:另一种显示回复发方式,见下面的sreenshot: [...]

  12. jazzle (not verified) Says:

    I've noticed one minor issue: If there is space, the ad unit will be put on the same line as the H2.

  13. Villarroel.info (beta) » Juguetes y herramientas para (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - widget para la barra lateral de wordpress [...]

  14. Money Maker Blog » Blog Archive » Falta mirar (not verified) Says:

    [...] http://www.mikesmullin.com/2006/04/01/adsense-widget-wordpress-sidebar/ [...]

  15. Mega list Google Adsense - Партнерские программы • Партнерки (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in. [...]

  16.   Mega list Google Adsense - Домашняя страница SEO (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in. [...]

  17. jian (not verified) Says:

    i’m getting this error when i put the adsense widget into the sidebar Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /wp-content/plugins/widgets/adsense.php on line 78 Warning: Invalid argument supplied for foreach() in /wp-content/plugins/widgets/adsense.php on line 96 ----------------------------------------------- i'v got the same problem with u

  18. WP Plugins Free Downloads « NetWinningTips (not verified) Says:

    [...] Using Jerome’s keywords, creates tag cloud 2-level subscription plugin AdSense Widget For WordPress Sidebar [...]

  19. Roger (not verified) Says:

    At my site: www.casarodante.org, I had a problem of Adsense showing ads in Italian. In researching it, it appears that you can override Adsense's detection with: google_language = "en"; I simply added: 'google_language' => "en", to the end of the array in this widget and it appears to be working great! FYI

  20. Dony Love (not verified) Says:

    Hey I am using this on my precharge projectnet blog. I love it! It's nice and easy to use but I have one question is there any way to make the border of the ads blend. Say put it inside a sticknote or something of that nature. Thank You

  21. Google Adsense mega tools - Партнерские программы • Партнерк (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in. [...]

  22.   Google Adsense mega tools - Домашняя страница SEO (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in. [...]

  23. Mark (not verified) Says:

    this looks interesting. love to implement it on my blog.

  24. googlesimplified.com :: WP widgets- A step by step guide. (not verified) Says:

    [...] Download the wp-widgets-AdSense from http://www.mikesmullin.com/2006/04/01/adsense-widget-wordpress-sidebar/. The zip file will contain one php file in it. Simply upload this (adsense.php) file to /wp-content/plugins/ directory. Then Activate it from “plugins” in your ap-admin panel. Now you should see the the AdSense widget in the list of “Available widgets“. Just drag and drop the widget as we did earlier. [...]

  25. googlesimplified.com :: WP widgets - A step by step guide. (not verified) Says:

    [...] Download the wp-widgets-AdSense from http://www.mikesmullin.com/2006/04/01/adsense-widget-wordpress-sidebar/. The zip file will contain one php file in it. Simply upload this (adsense.php) file to /wp-content/plugins/ directory. Then Activate it from “plugins” in your ap-admin panel. Now you should see the the AdSense widget in the list of “Available widgets“. Just drag and drop the widget as we did earlier. [...]

  26. Make Money and Get Free Stuff : Collection of Google AdSense (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget I designed for the new WordPress Sidebar Widgets plug-in. [...]

  27. 10 Best Wordpress Plugins for Google Adsense (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget designed for the new WordPress Sidebar Widgets plug-in. [...]

  28. Best 10 Wordpress Plugins for Google Adsense at Vortexmind: (not verified) Says:

    [...] Adsense Widget, per tutti coloro che amano utilizzare le widgets di Wordpress [...]

  29. The Coolest Technology, Blogging, Software, and Life Tips of (not verified) Says:

    [...] AdSense Widget for WordPress Sidebar - Google AdSense widget designed for the new WordPress Sidebar Widgets plug-in. [...]

  30. Die 10 besten AdSense-Plugins für Wordpress - Adult Webmaste (not verified) Says:

    [...] AdSense Widget for Wordpress Sidebar - damit lässt sich AdSense einfach in die Sidebar des Blogs integrieren. [...]

  31. Post new comment

    Please type the letters you see in the picture below.

    Image CAPTCHA