您的当前位置:首页 > 知识博客 > wordpress建站

WordPress文章修改日期标签:the_modified_date

时间:2024-03-16

WordPress模板标签the_modified_date输出文章最后修改日期,需要用在The Loop主循环里。

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

函数参数

$d

字符串值,默认值:WordPress后台选项中设置的日期格式

指定日期的格式

$before

字符串值,默认为空

日期前输出的内容

$after

字符串值,默认为空

日期后面输出的内容

$echo

布尔值,默认值:true

是否输出日期,还是只返回值,默认输出。

函数使用示例

<p>文章最后修改日期: <?php the_modified_date(); ?></p>

扩展阅读

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

相关函数:

  • get_the_date()

  • get_the_time()

  • the_date()

  • get_the_modified_date()

  • the_modified_time()

  • get_the_modified_time()

  • the_time()


欢迎咨询/Welcome to inquire
tel/vx:18842938855
qq:1685522781
email:1685522781@qq.com

Copyright © 2019-2024 sex.cyou


Whatsapp
Powered by RRZCMS