Monthchunks
Display monthly archives by year with links to each month in the following compact format: 2012 1 2 3 4 5 6 7 8 9 2011 1 2 3 4 5 6 7 8 9 10 11 12 2010 6 7 8 9 10 11 12 Serves as a drop in replacement for wp_get_archives( array( 'type' => 'monthly' ) ); . If you’re interested in contributing to the c
Display monthly archives by year with links to each month in the following compact format:
2012 1 2 3 4 5 6 7 8 9 2011 1 2 3 4 5 6 7 8 9 10 11 12 2010 6 7 8 9 10 11 12
Serves as a drop in replacement for wp_get_archives( array( 'type' => 'monthly' ) ); .
If you’re interested in contributing to the code behind this plugin, it’s also hosted on GitHub: https://github.com/justincwatt/wp-monthchunks
Screenshots & previews.
- 01Extract the zip file, drop the contents in your wp-content/plugins/ directory, and then activate from the Plugins page.
- 02Edit your theme file (e.g. sidebar.php) and replace the WordPress template tag wp_get_archives(); with monthchunks();
- 03You can also add it as a widget to any sidebar
Frequently asked questions.
How do I make the years display in ascending order (2010, 2011, 2012…) instead of descending (the default)?
The monthchunks function takes two optional parameters and the first is year_order , which accepts two string values: "descending" or "ascending" .
Can I make months display in a format other than the default month number (1, 2, 3…)?
The monthchunks function takes two optional parameters and the second is month_format , which accepts three string values: "numeric" , "alpha" , or "abbreviation" . The “alpha” format displays the first letter of the month (e.g. J, F, M…) which may not make sense in all languages. The “abbreviation” format displays the language-specific abbreviation for the month, e.g. (Jan, Feb, Mar…).