質問編集履歴

1

コードの追記

2016/05/25 18:24

投稿

ShogoChicago
ShogoChicago

スコア38

test CHANGED
File without changes
test CHANGED
@@ -52,6 +52,88 @@
52
52
 
53
53
 
54
54
 
55
+ ##現在のコード
56
+
57
+ ```PHP
58
+
59
+ 【comments.php】
60
+
61
+ <div id="comment_area">
62
+
63
+ <div class="comment_post">
64
+
65
+
66
+
67
+ <?php $args = array(
68
+
69
+ 'title_reply' => '口コミを投稿する',
70
+
71
+ 'label_submit' => '口コミを送信する',
72
+
73
+ 'fields' => array(
74
+
75
+ 'author' => '<p class="comment-form-author">' .
76
+
77
+ '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' placeholder="*お名前" /></p>',
78
+
79
+ ),
80
+
81
+ 'comment_field' => '<p class="comment-form-comment">' . '<textarea id="comment" name="comment" cols="50" rows="6" aria-required="true"' . $aria_req . ' placeholder="*口コミの内容" /></textarea></p>',
82
+
83
+ );
84
+
85
+ comment_form( $args ); ?>
86
+
87
+ </div>
88
+
89
+ <div class="posted_comments">
90
+
91
+ <?php if(have_comments()): ?>
92
+
93
+ <h3 id="comments">投稿された口コミ</h3>
94
+
95
+ <div class="commets-list">
96
+
97
+ <?php wp_list_comments(array('per_page' => '10','reverse_top_level' => true)); ?>
98
+
99
+ </div>
100
+
101
+ <?php endif; ?>
102
+
103
+ </div>
104
+
105
+ </div>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <?php if(get_comment_pages_count() > 1) : ?>
114
+
115
+ <div>
116
+
117
+ <?php previous_comments_link('前のコメント'); ?>
118
+
119
+ <?php next_comments_link('次のコメント'); ?>
120
+
121
+ </div>
122
+
123
+ <?php endif; ?>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ ```
134
+
135
+
136
+
55
137
  ##参考サイト
56
138
 
57
139
  http://motoyamayuki.com/blog/2015/07/22/comment_pagination/