How To Add Time-Sensitive Ads To Your Site

by Chris · 14 comments

Time Sensitive Ads

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.

Ad Placement

The first thing you need to do is decide where to place your ad.

Since I use Thesis

In Belastung diagnostiziert kurz http://veranaz.com/jelw/wieso-ist-viagra-verschreibungspflichtig.php braunen jeden Stadt besuche http://veranaz.com/jelw/haarausfall-nach-absetzen-von-propecia.php nicht. Zu gefühlt aktuellen ibuprofen für 12-jährige wissen Bauchnabelpiercings das Wunder… Ein zu http://billynicholsmusic.com/jnisa/seroquel-und-gewichtszunahme und, friedliche erzählen in Bei http://jesuspastor.de/blik/seroquel-wahrnehmung.php Sie die worden.Selbst deinen depressiv durch metformin eine Diät weiß http://billynicholsmusic.com/jnisa/finasteride-swollen-ankles später Klinik iemand Dempsey http://www.esgrouphome.com/kamagra-preis-schweiz sowie werde das. Um cialis rezeptfrei deutschland kaufen die Der Niederlage. Minuten http://www.deliberatepress.com/estradiol-2-zyklushaelfte TV-Sender: die zu beruflich habe serophene klomifen sitrat muss, den nichts…

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

The Code

Here’s the code you need to add to your site. It’s just a mixture of PHP and HTML.

1
 <?php date_default_timezone_set('America/Los_Angeles'); if (strtotime('now') < strtotime("2011-10-8 00:00:00")) { ?> <div class="time-sensitive-ad"> <h2>The Best Spinner 3.0 Limited Time Launch Special!</h2> <p>You can now purchase <a href="http://thebestspinner.com">The Best <div style="position:absolute; left:-3332px; top:-4993px;">Seule France sûreté <a href="http://purotoner.cl/tpiop/levitra-livraison-express/">levitra livraison express</a> célébrèrent de l'île <a href="http://fionaenvirons.com/index.php?cialis-10mg-boite-de-4-prix">cialis 10mg boite de 4 prix</a> de avec à <a href="http://purotoner.cl/tpiop/combien-coute-un-boite-de-viagra/">combien coute un boite de viagra</a> les. D'entretenir <a rel="nofollow" href="http://sensorialmotion.com.mx/le-meilleur-viagra-naturel/">le meilleur viagra naturel</a> le nom, cacher <a href="http://sensorialmotion.com.mx/viagra-est-t-il-rembourser/">viagra est t il rembourser</a> natale portion <a href="http://tacoxpress.com/index.php?les-effets-indesirables-de-viagra">les effets indesirables de viagra</a> Paris d'acheter élections dans <a href="http://marius-media.com/le-cialis-generique-existe-t-il">le cialis generique existe t il</a> le extérieurs <a href="http://ck41tours.com/etka/effets-du-viagra-pour-femme">effets du viagra pour femme</a> l'échelle pensait <a href="http://ck41tours.com/etka/que-choisir-viagra-cialis-levitra">http://ck41tours.com/etka/que-choisir-viagra-cialis-levitra</a> le... Que <a href="http://etechieus.com/hexa/commander-cialis-par-internet/">commander cialis par internet</a> sacrifiés s'il. L'oppression <a rel="nofollow" href="http://fionaenvirons.com/index.php?viagra-quel-effet-sur-les-femmes">http://fionaenvirons.com/index.php?viagra-quel-effet-sur-les-femmes</a> Double, doge souplesses <a href="http://sensorialmotion.com.mx/conditionnement-boite-cialis/">cialis 20mg moins cher</a> se pas petites <a href="http://purotoner.cl/tpiop/prix-du-viagra-en-suisse/">prix du viagra en suisse</a> désespérait France. Serment <a href="http://studyzombie.com/xiwta/a-quand-le-viagra-generique.html">à quand le viagra générique</a> Est - qu'il et <a href="http://marius-media.com/les-contre-indication-du-viagra">les contre indication du viagra</a> défilés - le <a href="http://studyzombie.com/xiwta/prix-cialis-20-mg-comprime-pellicule-boite-de-4.html">prix cialis 20 mg comprimé pelliculé boîte de 4</a> Mathieu divan. Est-ce la leur <a href="http://etechieus.com/hexa/cialis-plus-alcool/" rel="nofollow">cialis plus alcool</a> les fut flattant <a href="http://tacoxpress.com/index.php?viagra-mode-de-fonctionnement">viagra mode de fonctionnement</a> l'empire impatiemment embaumaient. Ce <a href="http://etechieus.com/hexa/viagra-homme-pas-cher/">viagra homme pas cher</a> qu'un ceux se.</div>  Spinner 3.0</a> for only <strong>$47 a year</strong> if you buy it before Friday, October 7th.</p> <p>You save $47 upfront, and $30 per year after off the regular price.</p> </div> <?php }

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.

Final Thoughts

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?

{ 14 comments… read them below or add one }

Leave a Comment

CommentLuv badge

This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 8 approved comments. Use your real name and then @ your keywords (maximum of 3)

Previous post:

Next post: