How to shorten Archive widget? (2 posts)

  1. Icithis
    Posted 5 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. Michael
    Forum Moderator
    Posted 5 years ago #

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


Topic Closed

This topic has been closed to new replies.

About this Topic