Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
此代码用于在 wordpress 中生成帖子的日期:
<span class="the_date">Posted: <?php echo get_the_time('F d, Y'); ?></span>
但是,它没有恢复日期,而是返回文本:
我该如何解决这个问题?
您可以尝试以下格式
<?php the_time('F j, Y \a\t g:i a'); ?> or <?php the_time(get_option('date_format')); ?>