Ad Rotator is a simple WordPress widget to display random HTML code from a given group of HTML-chunks separated with
<!--more--> on sidebar. Basically it shows different HTML every time you requesting page. There are infinite number of instances of this widget may exist.
Download and unpack plugin files to wp-content/plugins/ad-rotator/ directory.
Enable Ad Rotator plugin on your Plugins page in Site Admin.
Go to the Appearence/Widgets page in Site Admin and drag as many Ad Rotator widgets to your sidebars as you wish. Configure instances separating HTML blocks with
<!--more-->. Save changes.
Now on Ad Rotator blocks should appear on your sidebars.
AdRotator plugin is a simple file-based ad rotation solution. It was developed by Angsuman Chakraborty long time ago, but occasionally we have the same plugin names from WordPress’ point of view. If you are using this plugin, you may click upgrade link from your Plugins page and it being replaced with Ad Rotator widget.
So now you have two ways to solve the problem 'getad()' function is undefined:
You can download AdRotator and ignore upgrade notices, or
You can upgrade your theme to use Ad Rotator Widget.
Here is how to upgrade your theme. Find all occurrences of getad function,
and replace them with something like this:
'name' => 'ad-area',
'id' => 'ad-area',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => ''
Make sure you’ve replaced ad-area with the name suitable for you. Also
you can specify additional options, like before_title and after_title.
Then open the Appearence/Widgets page in Site Admin and configure Ad Rotator widget instances for your advertisements area. Just take into account, that in files for AdRotator ads are separated with new line character (ie each line means separate ad), but in Ad Rotator widget you should separate you blocks with
<!--more--> (so each of them may contain more then one line.)
Anyways, sorry for сonfusion, I did not want to сheat on you.
Plugin requires the WordPress version 2.8.0. Be sure your theme supports sidebar widgets.
Latest version of “Ad Rotator” is 2.0.3, and it can be downloaded here:
If you have any propositions, want to send feedback or found bugs, please post comments. It’s very important for me!
Frequently Asked Questions
Q. How to enter several ads to a single text box?
A. Separate your ad blocks with
Q. How many ads every instance of widget could handle?
A. Number of advertisements in each instance is unlimited.
Q. Can I use Google AdSense code as one of my ads?
A. Of course, you can use any HTML you wish (AdSense, Clicksor, Chitika, and everything else).
Q. WordPress shows `’getad()’ function is undefined` error
A. See explanation in Migrating from AdRotator plugin section.
- 2.0.3 (July 30, 2009)
- Fixed problem with backslashes appearing inside HTML (thanks to Maxx Kremer).
- 2.0.2 (July 29, 2009)
- Added section Migrating from AdRotator plugin in readme.txt.
- 2.0.1 (July 29, 2009)
- Fixed Installation section in readme.txt.
- Filter out HTML when user has no rights to edit unfiltered HTML.
- 2.0.0 (July 29, 2009)
- Completely rewritten using new WordPress 2.8 widgets API.
- Readme.txt file and couple of screenshots added.
- 1.0.1 (March 31, 2007)
- Plugin home page updated.
- 1.0.0 (May 1, 2006)
- Initial plugin implementation.
Full list of plugins I have implemented is available here.