WordPress模板标签get_month_link用来生成月份归档页链接,需要注意这个函数的两个参数都必须传递,否则会输出当前月份的链接并报错。
get_month_link( integer $year, integer $month)
函数参数
$year
整数型,默认为空
指定年份
$month
整数型,默认为空
指定月份
函数使用示例
<a href="">本月发表的文章
扩展阅读
get_month_link()函数位于:wp-includes/link-template.php
- get_the_date()
- get_the_time()
- the_date()
- the_modified_date()
- get_the_modified_date()
- the_modified_time()
- get_the_modified_time()
- the_time()
原创文章,作者:,如若转载,请注明出处:https://ce.771633.xyz/1577.html