我有收集在「新聞」類別中的所有職位的博客頁面,但所有的帖子顯示相同的日期(5 2013年5月),但本週WordPress的:the_time返回奇怪的日期
這天不同的名稱是代碼:
$wp_query = new WP_Query();
$wp_query->query('post_type=post&category_name=news&paged='.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="title">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="postmeta"> <span>Posted on <?php the_time('l, n F Y'); ?></span></div>
這是the_time輸出:
Posted on Saturday, 5 May 2013
Posted on Tuesday, 5 May 2013
Posted on Tuesday, 5 May 2013
Posted on Monday, 5 May 2013
沒有一個崗位或頁面發佈5月5日...我不知道解決這個問題......請幫助!
編輯:
發現問題,改變了這個:
<?php the_time('l, n F Y'); ?>
與此:
<?php the_time('l, j F Y'); ?>
the permalink&titles are ok? – Xavier