{"id":20074,"date":"2012-09-29T05:38:50","date_gmt":"2012-09-29T05:38:50","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/monthchunks\/"},"modified":"2026-01-04T17:13:45","modified_gmt":"2026-01-04T17:13:45","slug":"monthchunks","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/monthchunks\/","author":2009272,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.1.2","stable_tag":"3.1.2","tested":"6.9.4","requires":"3.0","requires_php":"","requires_plugins":null,"header_name":"Monthchunks","header_author":"Justin Watt, Xavi Ivars","header_description":"","assets_banners_color":"","last_updated":"2026-01-04 17:13:45","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/justinsomnia.org\/2005\/04\/monthchunks-howto\/","header_plugin_uri":"http:\/\/justinsomnia.org\/2005\/04\/monthchunks-howto\/","header_author_uri":"http:\/\/justinsomnia.org\/","rating":5,"author_block_rating":0,"active_installs":80,"downloads":3979,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.4":{"tag":"2.4","author":"justincwatt","date":"2013-04-15 00:19:16"},"3.1.1":{"tag":"3.1.1","author":"xavivars","date":"2021-05-08 10:18:48"},"3.1.2":{"tag":"3.1.2","author":"xavivars","date":"2026-01-04 17:13:45"}},"upgrade_notice":{"2.2":"<p>Improved performance of SQL queries<\/p>","2.0":"<p>Monthchunks is now a drop-in replacement for <code>wp_get_archives()<\/code><\/p>","1.0":"<p>Initial version<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2528356,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2528356,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.4","3.1.1","3.1.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2528356,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2528356,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2528356,"resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"This is how Monthchunks looks with the Twenty Eleven theme. You can see here that 4 years of archives (eventually 48 links) take up less than 200 vertical pixels of precious sidebar real estate. Note that if you're browsing a monthly archive page, that month's number is emboldened, but not linked. If you hover over the link for any month, you'll see the localized month name and year as a <em>tooltip<\/em>."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1445,3621,168,3623,8362],"plugin_category":[43],"plugin_contributors":[80854,86109],"plugin_business_model":[],"class_list":["post-20074","plugin","type-plugin","status-publish","hentry","plugin_tags-archive","plugin_tags-archives","plugin_tags-sidebar","plugin_tags-template-tag","plugin_tags-wp_get_archives","plugin_category-customization","plugin_contributors-justincwatt","plugin_contributors-xavivars","plugin_committers-justincwatt","plugin_committers-xavivars"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/monthchunks\/assets\/icon-128x128.png?rev=2528356","icon_2x":"https:\/\/ps.w.org\/monthchunks\/assets\/icon-256x256.png?rev=2528356","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/monthchunks\/assets\/screenshot-1.png?rev=2528356","caption":"This is how Monthchunks looks with the Twenty Eleven theme. You can see here that 4 years of archives (eventually 48 links) take up less than 200 vertical pixels of precious sidebar real estate. Note that if you're browsing a monthly archive page, that month's number is emboldened, but not linked. If you hover over the link for any month, you'll see the localized month name and year as a <em>tooltip<\/em>."},{"src":"https:\/\/ps.w.org\/monthchunks\/assets\/screenshot-2.png?rev=2528356","caption":""},{"src":"https:\/\/ps.w.org\/monthchunks\/assets\/screenshot-3.png?rev=2528356","caption":""}],"raw_content":"<!--section=description-->\n<p>Display monthly archives by year with links to each month in the following compact format:<\/p>\n\n<pre><code>2012\n1 2 3 4 5 6 7 8 9\n\n2011\n1 2 3 4 5 6 7 8 9 10 11 12\n\n2010\n6 7 8 9 10 11 12\n<\/code><\/pre>\n\n<p>Serves as a drop in replacement for <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/wp_get_archives\"><code>wp_get_archives( array( 'type' =&gt; 'monthly' ) );<\/code><\/a>.<\/p>\n\n<p>If you're interested in contributing to the code behind this plugin, it's also hosted on GitHub:\nhttps:\/\/github.com\/justincwatt\/wp-monthchunks<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Extract the zip file, drop the contents in your wp-content\/plugins\/ directory, and then activate from the Plugins page.<\/li>\n<li>Edit your theme file (e.g. sidebar.php) and replace the WordPress template tag <code>wp_get_archives();<\/code> with <code>monthchunks();<\/code><\/li>\n<li>You can also add it as a widget to any sidebar<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20make%20the%20years%20display%20in%20ascending%20order%20%282010%2C%202011%2C%202012...%29%20instead%20of%20descending%20%28the%20default%29%3F'><h3>How do I make the years display in ascending order (2010, 2011, 2012...) instead of descending (the default)?<\/h3><\/dt>\n<dd><p>The monthchunks function takes two optional parameters and the first is <code>year_order<\/code>, which accepts two string values: <code>\"descending\"<\/code> or <code>\"ascending\"<\/code>.<\/p><\/dd>\n<dt id='can%20i%20make%20months%20display%20in%20a%20format%20other%20than%20the%20default%20month%20number%20%281%2C%202%2C%203...%29%3F'><h3>Can I make months display in a format other than the default month number (1, 2, 3...)?<\/h3><\/dt>\n<dd><p>The monthchunks function takes two optional parameters and the second is <code>month_format<\/code>, which accepts three string values: <code>\"numeric\"<\/code>, <code>\"alpha\"<\/code>, or <code>\"abbreviation\"<\/code>. 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...).<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>3.1.1<\/h4>\n\n<ul>\n<li>Fix text domain<\/li>\n<\/ul>\n\n<h4>3.1<\/h4>\n\n<ul>\n<li>Changed l10n to adjust to new plugin translation process\n** Updated text-domain<\/li>\n<\/ul>\n\n<h4>3.0.4<\/h4>\n\n<ul>\n<li>Fix PHP Notice, incorrectly using variable instead of instance field. (thanks Birgir Erlendsson - @birgire)<\/li>\n<\/ul>\n\n<h4>3.0.3<\/h4>\n\n<ul>\n<li>Improve class constructor<\/li>\n<\/ul>\n\n<h4>3.0.2<\/h4>\n\n<ul>\n<li>Fix backwards compatibility calls to monthchunks<\/li>\n<\/ul>\n\n<h4>3.0.1<\/h4>\n\n<ul>\n<li>Fix admin area issue<\/li>\n<\/ul>\n\n<h4>3.0<\/h4>\n\n<ul>\n<li>Major refactor of the code\n** Created different files to split the backend logic and the widget<\/li>\n<li>Includes widget support<\/li>\n<li>Added localization templates<\/li>\n<\/ul>\n\n<h4>2.4<\/h4>\n\n<ul>\n<li>Added the new \"abbreviation\" mode for month display (thanks Xavi Ivars)<\/li>\n<\/ul>\n\n<h4>2.3<\/h4>\n\n<ul>\n<li>Use WordPress' Date and Time Locale object to localize month names in tooltip<\/li>\n<li>Change default year_order sort to descending (more closely matches wp_get_archives)<\/li>\n<li>Appropriately escape html output (though largely unnecessary)<\/li>\n<li>Fix: only display archive link for months with posts (not pages)<\/li>\n<\/ul>\n\n<h4>2.2<\/h4>\n\n<ul>\n<li>Generate output with a single SQL query, instead of N+1, where N was the number of years of post archives<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>Add year_order and month_format options<\/li>\n<li>Add <code>title=\"month_name year\"<\/code> attribute (aka tooltips) to the month links <\/li>\n<li>Lmited visible archives to posts with post_status = 'publish'<\/li>\n<li>Revise pretty html output slightly<\/li>\n<li>Add semifix for year = \"0000\" bug<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>Remove <code>&lt;ul&gt;&lt;\/ul&gt;<\/code> output to make monthchunks more of a drop-in replacement for <code>wp_get_archives()<\/code><\/li>\n<li>Add logic to de-link from current month<\/li>\n<li>Sort years in chronlogical order<\/li>\n<li>Don't print separator space after last month of year<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Use <code>$wpdb-&gt;posts<\/code> instead of <code>wp_posts<\/code> as table name<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Use WordPress' <code>get_month_link()<\/code> function to output link to monthly archive (thanks rapha\u00eble)<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial version<\/li>\n<\/ul>","raw_excerpt":"Concisely display monthly archives by year with links to each month.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/20074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=20074"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/justincwatt"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=20074"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=20074"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=20074"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=20074"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=20074"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=20074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}