I was trying to make a plugin that would show me posts that i made on the exact day in history.
I wanted this :
# 1 year ago (link to all posts from same day as now 1 year ago)
# 2 year ago (link to all posts from same day as now 2 year ago)
# 3 year ago (link to all posts from same day as now 3 year ago)
# 4 year ago (link to all posts from same day as now 4 year ago)
# 5 year ago: we wrote nothing
# 6 year ago (link to all posts from same day as now 6 year ago)
# 7 year ago: we wrote nothing
I managed to write the sql (I manage to get the exact result in phpmyadmin) but I'm not able to make it into an actual widget.
$sql = "SELECT DISTINCT post_ID , post_title, post_urltitle
FROM T_items__item
WHERE DATE_FORMAT(T_items__item.post_datestart, '%m') = month(now())
AND DATE_FORMAT(T_items__item.post_datestart, '%d') = day(now())
AND DATE_FORMAT(T_items__item.post_datestart, '%y') < year(now())
ORDER BY T_items__item.post_datestart DESC
LIMIT ".$params['history_posts_limit'];
I adapted ministats from Danny, I wrote it from scratch... nothing seems to work.
Can some of you wonderpeople manage this for me ?
See if this gets you started ;)
¥