I’m suffering from a little bout of writer’s block these days. When you combine that with the fact that I haven’t been cruising the ‘net finding new and funny things, it makes for a dearth of new content on this site. I was thinking that it would be cool to display a single post from the archives at the top of the home page when there’s nothing new to see. Something like, “Hey! Sorry I haven’t posted anything new in x days, but check out this from y years ago …” I got as far as writing the SQL for it, but then I stopped working on it. I think it’s a good idea, though. Maybe someone will decide to write a plugin to do this. (Or, more likely, someone already has and I am just too lazy to find it.)
In case anyone is interested, here is the SQL to find a post written on “this day prior to today”:
select * from wp_posts where date_format(post_date, '%m/%d') = date_format(now(), '%m/%d') and date_format(post_date, '%Y') < date_format(now(), '%Y') and post_status = 'publish' and post_type = 'post' order by comment_count desc, id desc limit 1
The query sorts by the post with the most comments on the assumption that that is probably the most interesting post if there were multiple posts on that day.