Thesis Tutorial – Adding Date Based Triggers to Your Posts

Written on March 7, 2009 – 11:27 pm | by mono1 |

There are a lot of times when you are working on your blog template where you want things to happen based on how old a post is. This tutorial shows you how to do it. The programming is pretty simple and you don’t have to be using the WordPress Thesis Theme to do it, but it would be a lot easier if you were …

Lets tackle the big question first why would you want to change your blog based on how old each post is? When your posts are new maybe you want social media bookmarking buttons to appear, but you don’t want them on older posts. Maybe you don’t want to annoy your regular readers with advertising, but after a posts is over 30 days old you want to monetize your archives, with adsense. Maybe your listings in the SERP’s show a date with them, this may be helpful for posts that are new, but as posts age this may cut down on the number of clicks you get from a search engine. Those are just a few examples, there are many many more.

In this tutorial I’m going to show you how to ad a block of adsense under the author by line. Let’s step through the code, the first thing we want to do is figure out how old the post is, here’s how we do it:

//how many days old is this post
$daysold = (current_time(timestamp) – get_the_time(‘U’) -
(get_settings(‘gmt_offset’)))/(24*60*60);

Read more from the source

Related Keywords for this posts:
seo inc, pricing, seo forum, search engine optimization news, usa tips seo, organic search, company and marketing

Related Posts

Put your related posts code here

Sorry, comments for this entry are closed at this time.

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:

Enter your email address:

Delivered by FeedBurner

Custom Search

Provide SEO services, web design and optimization for your web site with the latest technology, software and tools. Preferred search engine optimization company for you. Related Keywords : SEO services, technology, web design, company, tools, software, optimization, agency, firm, internet advertising