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.

Installation

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.

Migrating from AdRotator plugin

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:

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.)

It should appear between code chunks. It is just divider and separates chunks between each other. Therefor if you would past it after all chunks, blank area would be displayed sometimes because Ad Rotator would think that another chunk exists after last one. Just for example:

123

<imgsrc="ad1.jpg"/>
<!--more-->
<imgsrc="ad2.jpg"/>

This is correct using of plugin. And here is another wrong one:

1234

<imgsrc="ad1.jpg"/>
<!--more-->
<imgsrc="ad2.jpg"/>
<!--more-->

In the first case you have two chunks, in the second case there are three chunks exists, and one of them is blank.

I’ve used this fantastic widget/plugin for a few weeks and it works great.

However, Fantastico recommended that I upgrade my WordPress install from 2.1.3 to 2.2, and when I did the Ad Rotator instances that I have running in my sidebar turned into duplicates. So, instead of running Ad Rotator Widgets 1, 2, and 3. It just displays the content for Ad Rotator Widget 1 three different times.

I am working with a fresh install of WordPress 2.2 (about a week old) and I just installed Adrotator. It installed fine and I put the widget in the sidebar but the title is the only thing that appears. In Firefox, I get nothing at all and in IE I get a broken link symbol. I tried downloading that new widgets.php file, but it didn’t change anything. Any other suggestions?

Hi. I’m a first time user and a total novice. I cannot save the new ads to my widget. I open the code pop up, delete my old code, add the new code and then close the window. That should be it right? When I do this the new ads don’t save. I’ve cleared my cache and cookies and still nothing. Please can you help?!

Great and easy to use widget – but, just a question, how do I add another instance of the Widget? I tried renaming and uploading another file but it isn’t showing in the list. Probably obvious ot seasoned WP users but it’s got me stumped!

Hello, the adrotator is working fine but the ad address link would also show on a widget that is underneath it, for example if a have a text widget underneath the ad rotator the text would show underline and if you click on it will take you to the ad website that is showing on top.

I have installed the adrotater plugin in the plugin directory along with the other plugins, but it doesn’t show up in my WordPress plugin admin panel like the other ones. Any thoughts? I’m using 2.3.1.

I unwittingly put some javacode in my ad rotator box. Unfortunately, it crashed and i cannot simply go back in and change what is in the box. I even deleted and re-installed adrotator and it still doesn’t work. I just don’t understand and now my whole blog is damaged. any thoughts?

Chris, you may wish to use your phpmyadmin and see whether the crashing code is still in your database. If it is, flush it. You should then be able to reinstall the widget without it repeating the process. Look for whatever entry has “Ad-Rotator” (or similar) and browse it to find the offending entry.

Hi. I just installed this plugin on the newest version of WordPress. It seems that it is not rotating the images, but displaying both of them at the same time. You can see the widget at the bottom of the left sidebar on my blog, http://www.highcountrymomsquad.com

Post a comment

Name (required)

Email (will not be published) (required)

Website

You can use simple HTML-formatting tags (like <a>, <strong>, <em>, <ul>, <blockquote>, and other). To format your code sample use [cclang="php"]$a = "hello";[/cc] (allowed languages are ruby, php, yaml, html, csharp, javascript). Also you can use [cc][/cc] block and its syntax would not be highlighted.