WordPress.org

Ready to get started?Download WordPress

Forums

how to limit listing of archives? (2 posts)

  1. douglaseye
    Member
    Posted 5 years ago #

    As our WordPress blogs at thegazz.com have aged, the archives list of past posts has grown really, REALLY long. How do I set a limit on the number of archive options that are displayed, like archives for just the past year?

  2. designsimply
    Member
    Posted 5 years ago #

    This will get the last twelve months that have posts in them:
    <?php wp_get_archives('type=monthly&limit=12'); ?>
    http://codex.wordpress.org/Template_Tags/wp_get_archives#Last_Twelve_Months

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.