Support » Fixing WordPress » Showing the last 4 month in archive

  • Resolved szekuriti

    (@szekuriti)


    Hello!

    I show my archive by months to my visitors. It’s very long, because I bloging a long time. How can I do that WP just show the last 4 month in the archive list on my sidebar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m thinking you may be able to use something like this:

    <?php wp_get_archives('type=monthly&limit=4&format=option&show_post_count=1'); ?>

    I think that should limit you to the last four months, and it should also place a post count next to the archived month if you want it. You can alter that to suit your taste.

    Here is a reference for usage. Template Tags/wp get archives

    That’s an interesting avatar. That you, Chip?

    Thread Starter szekuriti

    (@szekuriti)

    Thanks, it works! My nick is Security Blogger, because my blog’s about security guards, security solutions and all king of security business.

    Glad it worked!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Showing the last 4 month in archive’ is closed to new replies.