質問編集履歴
3
「次のhtml タグと属性が使えます〜」の項目を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,8 @@
|
|
32
32
|
|
33
33
|
comments.phpを変更したことによりタイトルと送信ボタンのメッセージがそれぞれ「コメントを残す」「コメントを送信」から変わっています。
|
34
34
|
|
35
|
+
ついでに言うと、「次のhtml タグと属性が使えます〜」の表示がないことが気になりました。
|
36
|
+
|
35
37
|
|
36
38
|
|
37
39
|
```php
|
2
コードの表示をスクリーンショットからコードへ変更しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,15 @@
|
|
10
10
|
|
11
11
|
###現在の状況
|
12
12
|
|
13
|
+
comments.php
|
14
|
+
|
15
|
+
```php
|
16
|
+
|
13
|
-
|
17
|
+
<?php comment_form('format=html5&title_reply=コメントフォーム&label_submit=送信'); ?>
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
```
|
14
22
|
|
15
23
|
読み込んでいるファイルの一覧と、comments.phpの現在のコードです。
|
16
24
|
|
@@ -26,7 +34,259 @@
|
|
26
34
|
|
27
35
|
|
28
36
|
|
37
|
+
```php
|
38
|
+
|
39
|
+
<!DOCTYPE html>
|
40
|
+
|
41
|
+
<html lang="ja">
|
42
|
+
|
43
|
+
<head>
|
44
|
+
|
45
|
+
<meta charset="UTF-8">
|
46
|
+
|
47
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
48
|
+
|
49
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
50
|
+
|
51
|
+
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" />
|
52
|
+
|
53
|
+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
54
|
+
|
55
|
+
<title>
|
56
|
+
|
57
|
+
<?php bloginfo('name') ?>
|
58
|
+
|
59
|
+
<?php wp_title('|',true,'right'); ?>
|
60
|
+
|
61
|
+
</title>
|
62
|
+
|
63
|
+
</head>
|
64
|
+
|
65
|
+
<body<?php body_class(); ?>>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<?php wp_head(); ?>
|
70
|
+
|
71
|
+
<header>
|
72
|
+
|
73
|
+
<div class="container">
|
74
|
+
|
75
|
+
<div class="siteinfo">
|
76
|
+
|
77
|
+
<h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name') ?></a></h1>
|
78
|
+
|
79
|
+
<p><?php bloginfo('description'); ?></p>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</header>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<div class="container">
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<?php if( is_category() ): ?>
|
96
|
+
|
97
|
+
<h1 class="archive-title">
|
98
|
+
|
99
|
+
<i class="fas fa-folder-open"></i>
|
100
|
+
|
101
|
+
「<?php single_cat_title(); ?>」に関する記事
|
102
|
+
|
103
|
+
</h1>
|
104
|
+
|
105
|
+
<?php endif; ?>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<?php if( is_month() ): ?>
|
110
|
+
|
111
|
+
<h1 class="archive-title">
|
112
|
+
|
113
|
+
<i class="far fa-clock"></i>
|
114
|
+
|
115
|
+
「<?php echo get_the_date( 'Y年n月' ); ?>」に投稿した記事
|
116
|
+
|
117
|
+
</h1>
|
118
|
+
|
119
|
+
<?php endif; ?>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<?php if(have_posts()): while (have_posts()): the_post(); ?>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<article <?php post_class(); ?>>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<?php if(is_single()): ?>
|
132
|
+
|
133
|
+
<h1><?php the_title(); ?></h1>
|
134
|
+
|
135
|
+
<?php else: ?>
|
136
|
+
|
137
|
+
<h1> <a href="<?php the_permalink();?>"> <?php the_title(); ?></a></h1>
|
138
|
+
|
139
|
+
<?php endif; ?>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<div class="postinfo">
|
144
|
+
|
145
|
+
<time datetime="<?php echo get_the_date('Y-m-d') ?>">
|
146
|
+
|
147
|
+
<i class="far fa-calendar-alt"></i>
|
148
|
+
|
149
|
+
<?php echo get_the_date(); ?>
|
150
|
+
|
151
|
+
<i class="far fa-clock"></i>
|
152
|
+
|
153
|
+
<?php echo get_the_time(); ?>
|
154
|
+
|
155
|
+
</time>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<span class="postcat">
|
160
|
+
|
161
|
+
<i class="fas fa-folder-open"></i>
|
162
|
+
|
163
|
+
<?php the_category(','); ?>
|
164
|
+
|
165
|
+
</span>
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<?php the_content(); ?>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<?php if(is_single()): ?>
|
182
|
+
|
183
|
+
<div class="pagenav">
|
184
|
+
|
185
|
+
<span class="old">
|
186
|
+
|
187
|
+
<?php previous_post_link('%link','<i class="fas fa-chevron-circle-left"></i> %title'); ?>
|
188
|
+
|
189
|
+
</span>
|
190
|
+
|
191
|
+
<span class="new">
|
192
|
+
|
193
|
+
<?php next_post_link('%link','%title <i class="fas fa-chevron-circle-right"></i>'); ?>
|
194
|
+
|
195
|
+
</span>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<?php endif; ?>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<?php comments_template(); ?>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</article>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<?php endwhile; endif; ?>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<?php if($wp_query->max_num_pages > 1) ?>
|
216
|
+
|
217
|
+
<div class="pagenav">
|
218
|
+
|
219
|
+
<span class="old">
|
220
|
+
|
221
|
+
<?php next_posts_link('<i class="fas fa-chevron-circle-left"></i> 古い記事'); ?>
|
222
|
+
|
223
|
+
</span>
|
224
|
+
|
225
|
+
<span class="new">
|
226
|
+
|
227
|
+
<?php previous_posts_link('新しい記事 <i class="fas fa-chevron-circle-right"></i>'); ?>
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
</div>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<div class="blogmenu">
|
236
|
+
|
237
|
+
<ul>
|
238
|
+
|
29
|
-
|
239
|
+
<?php dynamic_sidebar('sidebar1'); ?>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<div class="widget">
|
244
|
+
|
245
|
+
<ul>
|
246
|
+
|
247
|
+
<li>
|
248
|
+
|
249
|
+
<a href="<?php bloginfo('rss2_url'); ?>"><i class="fas fa-rss-square"></i> RSS</a>
|
250
|
+
|
251
|
+
</li>
|
252
|
+
|
253
|
+
</ul>
|
254
|
+
|
255
|
+
</div>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
</ul>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
</div><!-- container -->
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<footer>
|
272
|
+
|
273
|
+
<div class="container">
|
274
|
+
|
275
|
+
<small>Copyright © <?php bloginfo('name'); ?></small>
|
276
|
+
|
277
|
+
</div>
|
278
|
+
|
279
|
+
</footer>
|
280
|
+
|
281
|
+
<?php wp_footer(); ?>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
</body>
|
286
|
+
|
287
|
+
</html>
|
288
|
+
|
289
|
+
```
|
30
290
|
|
31
291
|
index.phpのコードです。<?php comments_template(); ?>を筆記しています。
|
32
292
|
|
1
着地点を加えました。ご指摘ありがとうございます。
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,6 +38,12 @@
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
+
以下の並び順にすることが最終目標です。
|
42
|
+
|
43
|
+
![イメージ説明](3bed04bb4e739cd673b0fdb65419ad9d.png)
|
44
|
+
|
45
|
+
|
46
|
+
|
41
47
|
#補足情報(FW/ツールのバージョンなど)
|
42
48
|
|
43
49
|
ブラウザ:chrome(最新のバージョン)
|