Results 1 to 4 of 4
Thread: Blog archive by date and month.
Jan 9, 2010, 00:26 #1
- Join Date
- Jan 2010
- 0 Post(s)
- 0 Thread(s)
Blog archive by date and month.
OK, so I've been learning PHP for about a month and a half now and I'm really stumped on this one, and after hours of searching i haven't found a solution by myself so I'm turning to the wonderful people here at SitePoint.
Basically I'm building a blog from scratch out of PHP as a learning project and a usable finished product. Where I'm stuck is with my idea for an archive. What i want is a simple list that reads like the following example.
- January 2010 (1)
- February 2010 (3)
- May 2010 (2)
I want to display the month and year, and then how many blog post are in that time period, skipping the ones that are empty so i can link back to my previous posts. I've been racking my brain for a few hours now trying to work this out in my head and I'm not getting anywhere fast. The trouble is I don't know how to make it sort by both month and year and only display one link if I have more than one post in the same month. Any help would be overly appreciated.