How To Display WordPress Post Archives In Compact View?

If you are blogging from a very long time and established a blog with huge amount of content, then the default WordPress archives widget is ofcourse not for you, it can be pretty long and messy. Here’s the solution, in this tutorial we will show you how you can display archives a good looking compact form instead of displaying a long list of months.

Compact Archives, this WordPress plugin enables you to display monthly archives of posts in a compact form. It can be shown as a compact block suitable for the body of an archives page:

2009: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 
2008: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 
2007: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

or in an even more compact form to fit a sidebar:

2009: J F M A M J J A S O N D 
2008: J F M A M J J A S O N D 
2007: J F M A M J J A S O N D

or something in between:

2009: 01 02 03 04 05 06 07 08 09 10 11 12
2008: 01 02 03 04 05 06 07 08 09 10 11 12
2007: 01 02 03 04 05 06 07 08 09 10 11 12

How To Use Compact Archives Plugin?

Install and activate Compact Archives. Now there are three ways of displaying compact archives:

  1. You can use its Shortcode [compact_archive] in a page or post to display compact archives. See FAQ for shortcode parameters.
  2. It also provides you a Compact Archives Widget which can be used to display compact archives in sidebar or any widgetized area.
  3. Put <?php compact_archive(); ?> at the place in your template where you want it to appear, e.g., in your sidebar:
    <ul>
            <?php compact_archive(); ?>
        </ul>

You can learn more about its shortcode and template parameters here.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.