WordPress文章发表日期标签:the_date

WordPress模板标签the_date输出当前文章的发表日期,需要用在The Loop主循环中。

the_date( string $d = '', string $before = '', string $after = '', boolean $echo = true )

函数参数

$d

字符串值,默认值:WordPress选项中设置的值

日期的格式

$before

字符串值,默认为空

日期前输出的文本

$after

字符串值,默认为空

日期后输出的文本

$echo

布尔值,默认值:True

输出日期还是只返回相应的值,默认输出。

函数使用示例

<?php the_date('Y-m-d', '

', '

'); ?>

扩展阅读

the_date()函数位于:wp-includes/general-template.php

相关函数:

原创文章,作者:,如若转载,请注明出处:https://ce.771633.xyz/1571.html

Like (0)
Previous 2025年3月8日
Next 2025年3月8日

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注