This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Ad Squares Widget


This widget makes it possible for you to display 125×125 ad squares ( or some other configurable size ) into a widget-ready bar for WordPress®. You can have just 2 squares, or as many as 8 running together. It also supports multi-widget options. So technically you could have even more than 8 if you add it to a bar more than once. Each ad square accepts any HTML/JavaScript code, so it will work with standard affiliate ads, or even with ad network codes. You can also configure the widget to shuffle the positioning of your squares if you like.

The Ad Squares widget supports embedded PHP code too. If you know a little PHP scripting, you could add conditionals to the code that you place into this widget. For example, if you wanted to show different ads based on the category that is currently being displayed on your blog, you could do something like this:

<?php if(is_category("green-lizards")): ?>

  insert green lizard ad campaign here

<?php elseif(is_category("purple-socks")): ?>

  insert purple socks ad here

<?php else: ?>

  insert default ad code here

<?php endif; ?>


  • Ad Squares Widget / Screenshot #1


  1. Upload the /ad-squares-widget folder to your /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress®.
  3. Navigate to Appearance->Widgets and add the widget.

Special instructions for Multisite Blog Farms: If you’re installing this plugin on WordPress® with Multisite/Networking enabled, and you run a Blog Farm ( i.e. you give away free blogs to the public ); please define("MULTISITE_FARM", true); in your /wp-config.php file. When this plugin is running on a Multisite Blog Farm, it will mutate itself ( including its menus ) for safe compatiblity with Blog Farms. You don’t need to do this unless you run a Blog Farm. If you’re running the standard version of WordPress®, or you run WordPress® Multisite to host your own sites, you can ( and should ) skip this step.


What is the best size ( width x height ) to use?

The recommended size is 125×125, but it does not have to be that exact size. Just be sure to stick with the same size in each square so things remain symmetrical.

What type of code can I put into the ad squares?

Feel free to paste any type of ad code into the squares. AdSense®, XHTML, PHP, IFrame, JavaScript, whatever.

Contributors & Developers

“Ad Squares Widget” is open source software. The following people have contributed to this plugin.


Translate “Ad Squares Widget” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Routine maintenance. No signifigant changes.


  • Routine maintenance. No signifigant changes.
  • Compatibility with WordPress v3.2.


  • Versioning. Starting with this release, versions will follow this format: yymmdd. The version for this release is: 110523.
  • Routine maintenance. No signifigant changes.


  • Routine maintenance. No signifigant changes.


  • Routine maintenance. No signifigant changes.


  • Framework updated; general cleanup.
  • Updated with static class methods. This plugin now uses PHP’s SPL autoload functionality to further optimize all of its routines.
  • Optimizations. Further internal optimizations applied through configuration checksums that allow this plugin to load with even less overhead now.


  • Framework updated; general cleanup.
  • Updated for compatibility with WordPress® 3.1.


  • Framework updated; general cleanup.


  • Framework updated; general cleanup.


  • Framework updated; general cleanup.
  • Updated minimum requirements to WordPress® 3.0.


  • Framework updated to WS-W-3.0.


  • Framework updated to WS-W-2.3.


  • Updated minimum requirements to WordPress® 2.9.2.
  • Framework updated to WS-W-2.2.


  • Stable tag updated in support of tagged releases within the repository at


  • WebSharks Framework for Widgets has been updated to W-2.1.


  • Re-organized core framework. Updated to: W-2.0.
  • Updated to support WP 2.9+.


  • Added some additional documentation.
  • Added support for embedded PHP code.
  • Changed the rotation tag format to: <!--rotate-->.
  • Replaced deprecated split() function with preg_split().


  • Updated to provide better instruction on the options panel.


  • Added default placeholders when no ad codes are present.


  • Code re-organized / optimized for better performance.


  • Added a feature that allows you to select 2 to 8 squares per widget.


  • Updated to support ad shuffling / rotations.


  • Updated to support WordPress® 2.8.4.


  • Initial release.