저는 워드 프레스 테마를 개발 중이며 게시 날짜와 관련하여 이상한 문제가 있습니다. index.php
페이지, 내가 날짜를 보여 않습니다 삽입 게시물에Wordpress - 날짜가 올바르게 작동하지 않습니다.
(그림 확인)
하지만 최대한 빨리 새 게시물이 이전 게시물의 사라의 DAE를 추가 (아래 그림을 확인)
당신은 새로 추가 된 게시물의 날짜가 표시되고 있지만, 이전 게시물의 날짜가 사라진 것을 볼 수 있습니다. 위
<?php if (have_posts()): while (have_posts()): the_post(); ?>
<?php get_template_part('content', get_post_format()); ?>
<?php endwhile; ?>
<?php endif ?>
가
index.php
파일에있는 코드입니다 아래
content.php
파일의 코드
<div class="row-fluid">
<li <?php post_class("blog-page-post span12"); ?> id="<?php the_ID(); ?>">
<div class="row-fluid">
<?php if (has_post_thumbnail()): ?>
<a href="<?php the_permalink(); ?>" class="post-thumb span4">
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>
<article class="preview-details <?php echo has_post_thumbnail(get_the_ID()) ? "span8" : "span12"; ?>">
<p class="article-meta"><?php the_author_posts_link(); ?> on <?php the_date(get_option("date_format")); ?></p>
<h3 class="playlist-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<p class="excerpt"><?php echo string_limit_words(get_the_excerpt(), 55); ?></p>
</article>
<div class="container-fluid">
<p class="article-meta article-foot-meta muted pull-right">
<?php the_category(" / "); ?>
</p>
</div>
</div>
</li>
</div>
PS입니다 : 내가 사용하는 코드는 두 그건 경우 게시물은 동일한 형식이 당신 생각.
모두 포스트 날짜가 동일를 해결해야
사용해보십시오? –
예, 두 게시물의 날짜가 같습니다 –