WordPress.org

Ready to get started?Download WordPress

Forums

Archive sidebar list, too long (3 posts)

  1. acranox
    Member
    Posted 8 years ago #

    On the sidebar of my blogs there is the archives category, with a link for each month and year of the archives. But this list is too long. How do I limit this, for example, to only include, say 10 items? Or what about having it list every month for this year, and then a link for last year?
    There is probably an obvious answer, but I've searched and come up empty. thanks.

  2. oriecat
    Member
    Posted 8 years ago #

    You can format the archives list a couple different ways. Check the codex page, and it goes over the different options and some examples.

    http://codex.wordpress.org/Template_Tags/get_archives

  3. Kafkaesqui

    Posted 8 years ago #

    As oriecat notes, you can configure get_archives() / wp_get_archives() in a number of ways. Check out the info on the 'limit' parameter, or the "Using Dropdown List" example to set it up archives as a drowdown list.

    Also, a couple plugins that provide some improvements to archive linking:

    http://www.blindmuse.com/blog/2004/03/31/group-archives-by-year/
    (This allows you to limit the number of archive links displayed)

    http://www.oneofthosedays.org.uk/projects/plugin-archives
    (I use this on my blog)

Topic Closed

This topic has been closed to new replies.

About this Topic