WordPressのコメント欄の日付をスラッシュにしたいです。
<time datetime="2018-05-18T08:29:40+00:00">2018年5月18日 8:29 AM</time>
これを「2018/05/18 8:29 AM」で出力させたいのですけれど、いったいどこに上のように出力さえるテンプレートがあるのかわかりません。
comments.phpにもなくて途方に暮れています。
ご存じの方がいらっしゃいましたらスラッシュにする方法を教えてくださいませ。m(_ _)m
###追記
テーマとテンプレートを追記します。
★テーマ
pingraphy
参考:https://ja.wordpress.org/themes/pingraphy/
★テンプレート
commens.php
php
1<?php 2if ( post_password_required() ) { 3 return; 4} 5?> 6<div id="comments" class="comments-area"> 7 8 <div class="comment-form-wrap"> 9 <?php 10 $comment_args = array( 'title_reply'=>'コメントする <i class="fa fa-comment"></i>', 11 'fields' => apply_filters( 'comment_form_default_fields', array( 12 'author' => '<p class="comment-form-author"><input placeholder="名前'.( $req ? '*' : '' ).'" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" /></p>', 13 'email' => '<p class="comment-form-email"><input placeholder="Email'.( $req ? '*' : '' ).'" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" />'.'</p>', 14 'url' => '<p class="comment-form-url"><input placeholder="Website" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>' )), 15 'comment_field' => '<p><textarea placeholder="コメント" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>'.'</p>', 16 'comment_notes_after' => '', 17 ); 18 ?> 19 <?php if (get_comments_number() < 100) : ?> 20 <?php comment_form($comment_args); ?> 21 <?php endif;?> 22 </div> 23 24 <?php if ( have_comments() ) : ?> 25 <div class="comment-desc"> 26 <?php endif; ?> 27 <?php // You can start editing here -- including this comment! ?> 28 29 <?php if ( have_comments() ) : ?> 30 <ol class="comment-list"> 31 <?php 32 wp_list_comments( array( 33 'style' => 'ol', 34 'max_depth' => '2', 35 'per_page' => '100', 36 'avatar_size'=> 100, 37 'reply_text' => 'コメントする <i class="fa fa-comment"></i>', 38 'short_ping' => true, 39 'reverse_top_level' => true, 40 'reverse_children' => true 41 ) ); 42 ?> 43 </ol><!-- .comment-list --> 44 <?php endif; // Check for have_comments(). ?> 45 46 <?php 47 // If comments are closed and there are comments, let's leave a little note, shall we? 48 if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : 49 ?> 50 <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'pingraphy' ); ?></p> 51 <?php endif; ?> 52 53 <?php if ( have_comments() ) : ?> 54 </div><!-- .comment-desc --> 55 <?php endif; ?> 56 57</div><!-- #comments -->
回答1件
あなたの回答
tips
プレビュー