SB Ads plugin for simple WordPress Advertising

May 17th, 2012 by Sean Leave a reply »

I was asked a while back to write something basic to allow people to advertise on their site. It meant a simple widget or shortcode based system to just randomly show an advert on page load. I decided not to use any of the other plugins on account of them giving you far too many options when all you want to do is show an image or block of text or bit of javascript or flash element on a page (sometimes!).

I stumbled across an abandoned plugin called WP Ads which was, for want of a better word, rubbish. What it was though was suitably basic to give me a good starting point. So after removing all of the donate buttons and bad coding practise I added a widget and a shortcode to power it. I made it capable of supporting multiple advert zones and even category support so that it will only show certain adverts in different categories.

How to use

It adds a settings page beneath the WordPress admin settings menu. You get a list of adverts and then a list of zones. Clicking add new will give you an idiot proof data entry page where you just fill in a few simple fields and you’re done. Zone creation and naming is done on the fly by adding a name of your choice into the zone field. Any and all adverts must have a zone name and the widget essentially picks up all of those by the same name and rotates them.

You do need to know a bit of basic HTML if you wanted to use links and images although if you are using adsense or some adverts from affiliate window or some other system they generally provide you with a block of HTML to paste into the box for it to work.

I am happy to extend this plugin if anyone has any ideas to make it any better. My intention for it is to keep is very simple and perhaps streamline the interface and data storage a bit. Any and all comments welcome.

Download here: SB Ads (7.76 kB)

Leave a Reply