質問編集履歴
1
コードの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,6 +25,47 @@
|
|
25
25
|
3ページ目:10,9,8,7,6,5, 4, 3, 2, 1
|
26
26
|
このような状態です。
|
27
27
|
|
28
|
+
##現在のコード
|
29
|
+
```PHP
|
30
|
+
【comments.php】
|
31
|
+
<div id="comment_area">
|
32
|
+
<div class="comment_post">
|
33
|
+
|
34
|
+
<?php $args = array(
|
35
|
+
'title_reply' => '口コミを投稿する',
|
36
|
+
'label_submit' => '口コミを送信する',
|
37
|
+
'fields' => array(
|
38
|
+
'author' => '<p class="comment-form-author">' .
|
39
|
+
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' placeholder="*お名前" /></p>',
|
40
|
+
),
|
41
|
+
'comment_field' => '<p class="comment-form-comment">' . '<textarea id="comment" name="comment" cols="50" rows="6" aria-required="true"' . $aria_req . ' placeholder="*口コミの内容" /></textarea></p>',
|
42
|
+
);
|
43
|
+
comment_form( $args ); ?>
|
44
|
+
</div>
|
45
|
+
<div class="posted_comments">
|
46
|
+
<?php if(have_comments()): ?>
|
47
|
+
<h3 id="comments">投稿された口コミ</h3>
|
48
|
+
<div class="commets-list">
|
49
|
+
<?php wp_list_comments(array('per_page' => '10','reverse_top_level' => true)); ?>
|
50
|
+
</div>
|
51
|
+
<?php endif; ?>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
<?php if(get_comment_pages_count() > 1) : ?>
|
58
|
+
<div>
|
59
|
+
<?php previous_comments_link('前のコメント'); ?>
|
60
|
+
<?php next_comments_link('次のコメント'); ?>
|
61
|
+
</div>
|
62
|
+
<?php endif; ?>
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
```
|
68
|
+
|
28
69
|
##参考サイト
|
29
70
|
http://motoyamayuki.com/blog/2015/07/22/comment_pagination/
|
30
71
|
このサイトを見ながら操作してみましたが、このサイトのような結果にはなりません。
|