我无法在互联网上找到这个编码,非常感谢这个详细的答案。
我想像这样在主页上显示最新的帖子
第一篇文章标题-4分钟前发布第二篇文章标题-两天前发布第三篇文章标题-一年前发布
发布于 2017-10-01 20:24:50
在index的主循环中,按您的要求显示日期:
<?php printf( _x( '%s ago', '%s = human-readable time difference', 'your-text-domain' ), human_time_diff( get_comment_time( 'U' ), current_time( 'timestamp' ) ) ); ?>你可以读到更多关于它的信息:https://codex.wordpress.org/Function_参考资料/人_时间_比较
https://wordpress.stackexchange.com/questions/281602
复制相似问题