Tuesday, September 11, 2007

Function to show recently posts

The little template function that I wrote here turns out to be wrong.    I was trying to improve it by showing entries say a year ago.    This blog is too young so I tested that in my main blog.    I got wrong results displayed.

I found that the parameter I used in the Posts class was wrong hence I wasn't getting all the posts in the database.    It's now working here as I could check if this function is giving correct results.

There are actually 2 functions one for recent 2 weeks and another for 'a year ago'.   May be I'll merge them together as a single one to make theme files easier to manage.

No comments:

Post a Comment