2017-11-21 10 views
0

私はポストを持つ多言語サイトを持っています。ある言語の投稿はOKで、表示される日付は公開された日付です。他の言語では、常に今日の日付が表示されます。多言語ポストの日付問題

何が問題になりますか?

エントリーcontent.php

<!-- Blog date --> 
<?php if (get_theme_mod('blog_date', true)) { ?> 
    <div class="educon-blog-date"> 
     <?php $the_date = get_the_date(); ?> 
     <?php echo date_i18n("d", strtotime($the_date)); ?> <span><?php echo date_i18n("M Y", strtotime($the_date)) ?></span> 
    </div> 
<?php } ?> 
<!-- end date --> 

<!-- Blog author & comments --> 
<?php if (get_theme_mod('blog_author', true) || get_theme_mod('blog_comment', true)) { ?> 
    <ul class="blog-post-meta"> 
     <?php if (get_theme_mod('blog_author', true)) { ?> 
      <li class="meta-date"> 

       <span class="img-author"><i class="fa fa-user" aria-hidden="true"></i></span> 
       <?php if (get_the_author_meta('first_name') != "" || get_the_author_meta('last_name') != "") { ?> 
        <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php echo get_the_author_meta('first_name');?> <?php echo get_the_author_meta('last_name');?></a> 
       <?php } else { ?> 
        <?php the_author_posts_link() ?> 
       <?php }?> 
      </li> 
     <?php }?> 

     <?php if (get_theme_mod('blog_category', true)) { ?> 
      <li><i class="fa fa-eraser" aria-hidden="true"></i> <?php echo get_the_category_list(', '); ?></li> 
     <?php }?> 

     <!-- Comments section --> 
     <?php if (get_theme_mod('blog_comment', true)) { ?> 
      <?php if (! post_password_required() && (comments_open() || get_comments_number())) : ?> 
       <li class="meta-comment"> 
        <i class="fa fa-commenting-o"></i> 
        <?php comments_popup_link('<span class="leave-reply">' . esc_html__('0', 'wpeducon') . '</span>', esc_html__('1', 'wpeducon'), esc_html__('% comments', 'wpeducon')); ?> 
       </li> 
      <?php endif; //.comment-link ?> 
     <?php }?> 
     <!-- comments section end --> 
    </ul> 

<?php } ?> 


<!-- Blog Title --> 
<div class="entry-header"> 
    <h2 class="entry-title blog-entry-title"> 
     <?php if (is_single()) {?> 
      <?php the_title(); ?> 
     <?php } else { ?> 
     <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> 
     <?php }?> 
     <?php if (is_sticky() && is_home() && ! is_paged()) { ?> 
     <span class="featured-post"><i class="fa fa-star"></i></span> 
     <?php } ?> 
    </h2> <!-- //.entry-title --> 
</div> 
<!-- Blog title End --> 

以上がエントリーcontent.php

+1

あなたはURLを共有できますか? –

+1

あなたがBOSNIAN言語の投稿を投稿したとき –

+0

2015年7月15日。英語の投稿が掲載された同じ日。 – NDOE

答えて

0

問題は、一般的な設定でカスタム日付形式だったからコードです。私がそれを変えた時、投稿の日付もあまりにも変わった。