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()
免责声明:
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,请不要用于商业用途!
3. 如果你也有好源码或者教程,可以到审核区发布,分享有金币奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源均免费,可通过签到获取金币,抵制伸手党!