Word Press获取文章发布时间并生成归档日期链接
发布日期获取
<pre class="wp-block-code">
$year = get_the_time( ‘Y’ );
$month = get_the_time( ‘m’ );
$day = get_the_time( ‘d’ );
格式化发布日期
<pre class="wp-block-code">
get_the_time( ‘Y年m月d日’ ) ;
年存档链接
<pre class="wp-block-code">
get_year_link( $year );
月存档链接
<pre class="wp-block-code">
get_month_link( $year, $month );
日存档链接
<pre class="wp-block-code">
get_day_link( $year, $month, $day );