美文网首页
修改wordpress文章发布时间精确到秒

修改wordpress文章发布时间精确到秒

作者: denghuo7743 | 来源:发表于2019-05-17 13:37 被阅读0次

详细教程,一般这个修改是主题文件里,找到主题的文章页面文件single.php 找到代码

<?php echo get_the_time('Y-m-d')?>

修改为

<?php echo the_time('Y-m-d G:i:s');?>

wordpress时间函数以及参数

文章的时间函数为:<?php the_time() ?>
评论的时间函数为: <?php comment_date() ?>
评论的日期函数为:<?php comment_time() ?>

相关文章

网友评论

      本文标题:修改wordpress文章发布时间精确到秒

      本文链接:https://www.haomeiwen.com/subject/znnnaqtx.html