Use WP125 as an Ad Rotator

I’ve received a few emails now asking for ad rotation features in WP125. Now, that’s not something I want to build into the plugin’s core files. Only a few people want it, and I don’t want to make the code needlessly bloated over something that doesn’t fit the ordinary uses and intention of the plugin.

After telling most of those people something along the lines “sorry, unsupported,” I came up with a quick solution (that one emailer was lucky enough to get). This solution doesn’t modify the plugin code, and seems to work pretty well. I figured I’d share it here, in case there’s anyone else who wants it.

Basically, if you want to have a rotation instead of a “normal” block of 125×125 ads, you just need to make use of the handy <?php wp125_single_ad(num); ?> template tag I created for “unforseen circumstances” when I wrote WP125. Just put this code where you want your rotation to appear:

<?php wp125_single_ad(rand(1,6)); ?>

Just replace the “6” with the number of ad slots you have.

Now, fill your ad slots with banners and you’re done.

iBegin Share

Social media has really taken off in recent years. Few major blogs don’t have some sort of widget or icon on permalink pages to promote Digging, Stumbling, or whatever. Many blogs go nuts and have 26 different social bookmarking icons in a row beneath…

AJAX, Disambiguation

“AJAX,” which stands for “Asynchronous Javascript and XML” has sadly been being used as a buzzword lately, referring to Javascript/DHTML tricks rather than it’s “real” meaning. AJAX is the use of the XMLHttpRequest object in JavaScript to load new content from a server into…

Duplicate Content

We always hear about how Google doesn’t like duplicate content, and will penalize a page that has the same content as another. There are plenty of articles on optimizing sites to avoid having duplicate content internally, and articles ranting about scrapers. What I want…

BlogBuzz October 11, 2008

Sikbox – Live Search Made Easy

“Live Search” is a term that people started using somewhere along the line to refer to AJAX-y search forms that display results as you type, rather than taking you to a results page. Kind of like Apple’s Spotlight search in OSX, which I have…

Interview With Daniel Scocco of Daily Blog Tips

Daniel Scocco is the blogger behind Daily Blog Tips, the 28th most popular blog in the Technorati 100. He has been blogging since 2005, and has since become an authority in the area. I managed to score a quick 10-question interview with Mr. Scocco…

Learning MySQL [Book Review]

Almost anyone who’s played around with PHP before has run into the subject of databases. MySQL databases are the most common method of storing massive amounts of data to later be sorted through and retrieved for display via script. WordPress stores all of it’s…

WordPress Theme of the Month: Agregado

Agregado is October 2008’s featured free WordPress theme.

StumbleUpon 2.0: Where is this Going?

Apparently, StumbleUpon will be throwing the switch on some major changes soon, and changing how users interact with the service. The software toolbar will no longer be necessary (they had better keep it though!), some new options for publishers will be introduced, etc. On…