Wordpress Document

Author tags

Category tags

Comment tags

Date and Time tags

General tags

Geo tags

Link tags

Links Manager tags

Permalink tags

Post tags

Trackback tags

WP/PHP General

get_month_link

概要

月間アーカイブページのURLをPHPで使えるように返します。
ブラウザに表示されません。
yearとmonthパラメータに''が渡されると、現在表示中のページの年月を使用します。

用法

<?php get_month_link('year', 'month'); ?>

引数

year (integer)

アーカイブの年。''で現在表示中のページの年

month (integer)

アーカイブの月。''で現在表示中のページの月

用例

<a href="<?php echo get_month_link('', ''); ?>">All posts this month</a>