【发布时间】:2016-05-11 03:38:19
【问题描述】:
我正在开发我的 wordpress 主题,评论时间/日期显示在一个连续的时间戳标签中:
<time datetime="2015-12-21T19:09:49+00:00"> december 21st, 2015 on 19:09 </time>
我希望将一天中的时间包裹在一个跨度标签中,这样我就可以使用 css 对其进行样式设置。我的主题上的comment.php 文件使用它来列出cmets,这里无法编辑时间戳:
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'format' => 'html5',
'short_ping' => true,
) );
?>
</ol>
我尝试查看我的主题的functions.php,以及wordpress 的包含文件:comment.php 和comment-template.php。它们都没有处理时间戳的实际标签结构,所以我没有什么可以玩的。
有人知道我该怎么做吗?显然,我宁愿在我的主题的 functions.php 中做这件事,也不愿改变 wp inc 的东西..
谢谢!
【问题讨论】: