开发者 |
justincwatt
xavivars |
---|---|
更新时间 | 2023年5月11日 05:10 |
捐献地址: | 去捐款 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
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
wp_get_archives();
with monthchunks();
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...).
title="month_name year"
attribute (aka tooltips) to the month links<ul></ul>
output to make monthchunks more of a drop-in replacement for wp_get_archives()
$wpdb->posts
instead of wp_posts
as table nameget_month_link()
function to output link to monthly archive (thanks raphaële)