WordPress.org

Ready to get started?Download WordPress

Forums

Limit Archive Links in Sidebar (3 posts)

  1. Jon Henwood
    Member
    Posted 4 years ago #

    Hi

    Is it possible to limit the amount of links shown under archive to say 6 months. The months should be shown as current. So for example if the months now are (latest first) June, May, April, March, February, January, in July, Jan would fall away and July would take June's position.

    Thanks
    Jon

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    <?php wp_get_archives('type=monthly&limit=6'); ?>

  3. Arnoud
    Member
    Posted 4 years ago #

    This doesn't seem to work when a Widget is used to display the months.
    sidebar.php is overruled somehow.

    In what file should I change this code?

Topic Closed

This topic has been closed to new replies.

About this Topic