Often times, you will find that want to highlight an event on your site that lasts for a limited amount of time. It could be the launch of a product, a contest you’re running, or just a special sale that’s going on.
What most people do in this situation is to create a static text message for the offer and place it on their. The problem is, when the offer expires, it’s way too easy to forget about it for days or weeks at a time. And while it remains up, it looks really bad for your site to be promoting something that’s long expired.
This came to mind recently with the recent The Best Spinner 3.0 launch. There was a special 45% off sale going on during the launch which I wanted to highlight on a site of mine. However, the sale was only going to last a week.
So I thought about the problem a bit, and came up with my solution for a time sensitive ad.
If you don’t mind modifying some PHP on your site, it’s actually pretty simple to implement yourself.
The first thing you need to do is decide where to place your ad.
Since I use Thesis
for all my sites, I like to put this sort of ad in the Feature Box. The Feature Box appears above the fold above my content, which makes it a good place to show an eye-catching ad.
Other good places include your sidebar or the top or bottom of a particular post.
Once you’ve decided on your placement, you will need to open up the appropriate php file for your WordPress Theme (ex. sidebar.php). Or, you have widgetized areas in your theme you can install the PHP Code Widget and place the code in there.
Here’s the code you need to add to your site. It’s just a mixture of PHP and HTML.
The Best Spinner 3.0 Limited Time Launch Special!
You can now purchase The Best
Spinner 3.0 for only $47 a year if you buy it before Friday, October 7th.
You save $47 upfront, and $30 per year after off the regular price.
There are basically 3 important parts the code.
Line 2 sets the default timezone that is used by all the date/time function in the code snippet. Here, I’m specifying Pacific Standard Time. You can use any timezone identifier listed here.
Line 3 says, “If the current time is before the deadline time, then show the ad. If it’s after, then don’t do anything.”
In this example, I’m using midnight on Oct 8, 2011 as the date and time I want my ad to expire. Change this value to match your own deadline.
Lastly, I display my message inside a DIV tag. You can include any html code you want here. It’s up to you.
Just make sure to use some CSS to style your ad properly so it looks good and catches the eye of your reader.
Without figuring out how to implement this code, I would not have bothered to promote The Best Spinner 3.0 sale to my visitors. However I’m glad I did, because this particular ad actually tripled my normal affiliate commissions during this week long sales period.
What do you think? Can you find a good use for time-sensitive ads on your own sites?