사용자 정의 테마를 실행중인 My WordPress 블로그는 오늘 각 게시물의 날짜를 같은 날짜로 표시합니다. 내 메인 홈 페이지의 마지막 세 게시물을 표시하지만 그 날짜는 괜찮습니다. 그러나 내 메인 블로그 페이지에는 모든 게시물의 현재 날짜가 표시됩니다.WordPress 블로그 날짜가 모든 게시물의 현재 날짜를 표시합니다.
내 사이트에 FTP로 접속할 수 있고 모든 PHP 파일에 액세스 할 수 있습니다. 문제는 index.php, page.php, single이든이 오류가 있을지 모릅니다. .php, 나는 모른다. 누구든지 문제가있는 곳을 제안 할 수 있으면 해당 코드를 공유하여 도움을받을 수 있습니다.
는 여기에 내가 테마 템플릿 태그를 사용하는 경우가 the_time
기능을 이용해야하는 경우, the_date
기능을 사용하고 거의 확실 해요 index.php를
<?php
get_header(); ?>
<div class="wrap blog">
<h1>Blog</h1>
<div class="blog-left">
<div id="main-content" class="main-content">
<?php
if (is_front_page() && twentyfourteen_has_featured_posts()) {
// Include the featured content template.
get_template_part('featured-content');
}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
if (have_posts()) :
// Start the Loop.
while (have_posts()) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part('content', get_post_format());
endwhile;
// Previous/next post navigation.
twentyfourteen_paging_nav();
else :
// If no content, include the "No posts found" template.
get_template_part('content', 'none');
endif;
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar('content'); ?>
</div><!-- #main-content -->
</div>
<div class="blog-right">
<?php get_sidebar(); ?>
</div>
</div>
<?php
get_footer();
당신이 코드를 추가 할 수 있습니다 .PHP 특별한 포스트 형식, 내용 -의 {형식}의 content.php 또는 경우에? –
thats 문제는, 나는 그 코드가 어디 있을지 모르겠다 .... 나는 단순히 내 페이지에 최신 10 개의 게시물을 표시하는 일반 -> 설정 아래에 충돌, 그리고 워드 프레스 않습니다. 하지만 잘못된 날짜를 표시하는 것입니다 ... – user3688814
'index_php' 파일을 추가하려고합니다.'have_post' 함수를 호출하는 동안'while' 내부에있는 부분을 추가하십시오. –