WordPress.org

Ready to get started?Download WordPress

Forums

code to display annivesary posts... (1 post)

  1. Dgold
    Member
    Posted 8 years ago #

    "Anniversary of" posts Loop in my sidebar, with 2 posts per year 2005, 2004, 2003, 2002....

    I got this code from Kaf, a long time ago! Needs help in 2006. It was working WP 1.5.3, but now that I installed WP 2.0.3, this code isn't doing what it's supposed to do. Can someone help me troubleshoot & understand these custom query/loops?

    I use this in my sidebar, the effect is supposed to generate this result:
    "2 Recent Setlists"
    --- 1 post title from 2006
    --- 2nd post title from 2006

    "2 Setlists from 2005"
    --- 1 post title from 2005 (same month it is right now)
    --- 2nd post title from 2005 (anniversary of this post)

    "2 Setlists from 2004"
    ---1 post title from 2004
    --- 2nd post title from 2004

    etc... etc...

    Now here is the code I'm using. Please look at the code:
    http://pastebin.com/756505

    In WP1.5 it generated the above result. In WP2 it generates the same 2 recent posts (from 2006) over and over again. However the headlines are still correctly decending 2006 > 2005 >2004 > 2003 > 2002.

Topic Closed

This topic has been closed to new replies.

About this Topic