the_time()

WordPress文章发表时间函数

WordPress模板函数the_time输出当前文章的发表时间,需要用在The Loop主循环中。

the_time( string $d = '' )

函数参数

$d

字符串值,默认为WordPress后台常规设置中的时间格式

时间格式

函数使用示例

<p>文章发表时间: <?php the_time('g:i a'); ?></p>

扩展阅读

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

相关函数:

get_the_date()
get_the_time()
the_date()
the_modified_date()
get_the_modified_date()
the_modified_time()
get_the_modified_time()

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索