質問編集履歴
3
ごじ
title
CHANGED
File without changes
|
body
CHANGED
@@ -21,19 +21,6 @@
|
|
21
21
|
commens.php
|
22
22
|
```php
|
23
23
|
<?php
|
24
|
-
/**
|
25
|
-
* The template for displaying comments.
|
26
|
-
*
|
27
|
-
* The area of the page that contains both current comments
|
28
|
-
* and the comment form.
|
29
|
-
*
|
30
|
-
* @package Pingraphy
|
31
|
-
*/
|
32
|
-
/*
|
33
|
-
* If the current post is protected by a password and
|
34
|
-
* the visitor has not yet entered the password we will
|
35
|
-
* return early without loading the comments.
|
36
|
-
*/
|
37
24
|
if ( post_password_required() ) {
|
38
25
|
return;
|
39
26
|
}
|
2
ごじ
title
CHANGED
File without changes
|
body
CHANGED
@@ -69,7 +69,7 @@
|
|
69
69
|
'max_depth' => '2',
|
70
70
|
'per_page' => '100',
|
71
71
|
'avatar_size'=> 100,
|
72
|
-
'reply_text' => '
|
72
|
+
'reply_text' => 'コメントする <i class="fa fa-comment"></i>',
|
73
73
|
'short_ping' => true,
|
74
74
|
'reverse_top_level' => true,
|
75
75
|
'reverse_children' => true
|
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,4 +6,88 @@
|
|
6
6
|
|
7
7
|
comments.phpにもなくて途方に暮れています。
|
8
8
|
|
9
|
-
ご存じの方がいらっしゃいましたらスラッシュにする方法を教えてくださいませ。m(_ _)m
|
9
|
+
ご存じの方がいらっしゃいましたらスラッシュにする方法を教えてくださいませ。m(_ _)m
|
10
|
+
|
11
|
+
|
12
|
+
###追記
|
13
|
+
テーマとテンプレートを追記します。
|
14
|
+
|
15
|
+
★テーマ
|
16
|
+
pingraphy
|
17
|
+
参考:[https://ja.wordpress.org/themes/pingraphy/
|
18
|
+
](https://ja.wordpress.org/themes/pingraphy/)
|
19
|
+
|
20
|
+
★テンプレート
|
21
|
+
commens.php
|
22
|
+
```php
|
23
|
+
<?php
|
24
|
+
/**
|
25
|
+
* The template for displaying comments.
|
26
|
+
*
|
27
|
+
* The area of the page that contains both current comments
|
28
|
+
* and the comment form.
|
29
|
+
*
|
30
|
+
* @package Pingraphy
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
* If the current post is protected by a password and
|
34
|
+
* the visitor has not yet entered the password we will
|
35
|
+
* return early without loading the comments.
|
36
|
+
*/
|
37
|
+
if ( post_password_required() ) {
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
?>
|
41
|
+
<div id="comments" class="comments-area">
|
42
|
+
|
43
|
+
<div class="comment-form-wrap">
|
44
|
+
<?php
|
45
|
+
$comment_args = array( 'title_reply'=>'コメントする <i class="fa fa-comment"></i>',
|
46
|
+
'fields' => apply_filters( 'comment_form_default_fields', array(
|
47
|
+
'author' => '<p class="comment-form-author"><input placeholder="名前'.( $req ? '*' : '' ).'" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" /></p>',
|
48
|
+
'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>',
|
49
|
+
'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>' )),
|
50
|
+
'comment_field' => '<p><textarea placeholder="コメント" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>'.'</p>',
|
51
|
+
'comment_notes_after' => '',
|
52
|
+
);
|
53
|
+
?>
|
54
|
+
<?php if (get_comments_number() < 100) : ?>
|
55
|
+
<?php comment_form($comment_args); ?>
|
56
|
+
<?php endif;?>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<?php if ( have_comments() ) : ?>
|
60
|
+
<div class="comment-desc">
|
61
|
+
<?php endif; ?>
|
62
|
+
<?php // You can start editing here -- including this comment! ?>
|
63
|
+
|
64
|
+
<?php if ( have_comments() ) : ?>
|
65
|
+
<ol class="comment-list">
|
66
|
+
<?php
|
67
|
+
wp_list_comments( array(
|
68
|
+
'style' => 'ol',
|
69
|
+
'max_depth' => '2',
|
70
|
+
'per_page' => '100',
|
71
|
+
'avatar_size'=> 100,
|
72
|
+
'reply_text' => 'にコメントする <i class="fa fa-comment"></i>',
|
73
|
+
'short_ping' => true,
|
74
|
+
'reverse_top_level' => true,
|
75
|
+
'reverse_children' => true
|
76
|
+
) );
|
77
|
+
?>
|
78
|
+
</ol><!-- .comment-list -->
|
79
|
+
<?php endif; // Check for have_comments(). ?>
|
80
|
+
|
81
|
+
<?php
|
82
|
+
// If comments are closed and there are comments, let's leave a little note, shall we?
|
83
|
+
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
84
|
+
?>
|
85
|
+
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'pingraphy' ); ?></p>
|
86
|
+
<?php endif; ?>
|
87
|
+
|
88
|
+
<?php if ( have_comments() ) : ?>
|
89
|
+
</div><!-- .comment-desc -->
|
90
|
+
<?php endif; ?>
|
91
|
+
|
92
|
+
</div><!-- #comments -->
|
93
|
+
```
|