Support » Fixing WordPress » wp_get_archives – Group Month Archives into Yearly Subcatagories

  • I currently have my archives set up using the following code:
    wp_get_archives('type=monthly');

    Which displays my archives like so:
    1. January 2010
    2. December 2009
    3. November 2009
    4. October 2009
    5. etc

    My question is, how can I set it up so that the archives are grouped into years, with only the current year visible, like so:

    1. 2010
    a. February 2010
    b. January 2010
    2. 2009
    3. 2008
    4. 2007
    5. etc

    Where if I were to click “2008” the 2010 archive months would close and the 2008 archive months would show, like so:

    1. 2010
    2. 2009
    3. 2008
    a. December 2008
    b. November 2008
    c. October 2008
    d. September 2008
    e. August 2008
    f. etc
    4. 2007
    5. etc

    Any suggestions?

    Cheers,
    Bryan

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_get_archives – Group Month Archives into Yearly Subcatagories’ is closed to new replies.