WordPress.org

Ready to get started?Download WordPress

Forums

How to shorten Archive widget? (2 posts)

  1. Icithis
    Member
    Posted 3 years ago #

    I've got an archive that goes back to 1998, and showing it by months (and even by years) seems to be a bit too much. Is there any way to change the archive widget so that I can use monthly as in;

    <?php wp_get_archives(apply_filters('widget_archives_args', array('type' => 'monthly', 'show_post_count' => $c))); ?>

    So that it only shows the last 12 months which had updates (ie if in the last two years there was no updates every other months it would go back two years) instead of flooding my sidebar with a huge list of months? And have a 'more' link or something so that users are aware there is more to the archive.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    try the 'limit' parameter - and always read the codex:

    http://codex.wordpress.org/Function_Reference/wp_get_archives

Topic Closed

This topic has been closed to new replies.

About this Topic