質問編集履歴

1

コードの追記

2019/02/04 07:15

投稿

oka02
oka02

スコア15

test CHANGED
File without changes
test CHANGED
@@ -160,6 +160,138 @@
160
160
 
161
161
 
162
162
 
163
+
164
+
165
+ ーーーーーーーーーー↓↓↓追記後↓↓↓ーーーーーーーーーー
166
+
167
+
168
+
169
+ <?php
170
+
171
+
172
+
173
+ get_header(); ?>
174
+
175
+
176
+
177
+ <div class="wrap">
178
+
179
+ <?php if ( is_home() && ! is_front_page() ) : ?>
180
+
181
+ <header class="page-header">
182
+
183
+ <h1 class="page-title"><?php single_post_title(); ?></h1>
184
+
185
+ </header>
186
+
187
+ <?php else : ?>
188
+
189
+ <header class="page-header">
190
+
191
+ <h2 class="page-title"><?php _e( 'Posts', 'twentyseventeen' ); ?></h2>
192
+
193
+ </header>
194
+
195
+ <?php endif; ?>
196
+
197
+
198
+
199
+ <div id="primary" class="content-area">
200
+
201
+ <main id="main" class="site-main" role="main">
202
+
203
+
204
+
205
+ <?php
206
+
207
+ if ( have_posts() ) :
208
+
209
+
210
+
211
+ /* Start the Loop */
212
+
213
+ while ( have_posts() ) :
214
+
215
+ the_post();
216
+
217
+
218
+
219
+ /*
220
+
221
+ * Include the Post-Format-specific template for the content.
222
+
223
+ * If you want to override this in a child theme, then include a file
224
+
225
+ * called content-___.php (where ___ is the Post Format name) and that will be used instead.
226
+
227
+ */
228
+
229
+ get_template_part( 'template-parts/post/content', get_post_format() );
230
+
231
+
232
+
233
+ // If comments are open or we have at least one comment, load up the comment template.
234
+
235
+ if ( comments_open() || get_comments_number() ) :
236
+
237
+ comments_template();
238
+
239
+ endif;
240
+
241
+
242
+
243
+ endwhile;
244
+
245
+
246
+
247
+ the_posts_pagination(
248
+
249
+ array(
250
+
251
+ 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
252
+
253
+ 'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
254
+
255
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
256
+
257
+ )
258
+
259
+ );
260
+
261
+
262
+
263
+ else :
264
+
265
+
266
+
267
+ get_template_part( 'template-parts/post/content', 'none' );
268
+
269
+
270
+
271
+ endif;
272
+
273
+
274
+
275
+ ?>
276
+
277
+
278
+
279
+ </main><!-- #main -->
280
+
281
+ </div><!-- #primary -->
282
+
283
+ <?php get_sidebar(); ?>
284
+
285
+ </div><!-- .wrap -->
286
+
287
+
288
+
289
+ <?php
290
+
291
+ get_footer();
292
+
293
+
294
+
163
295
  ```
164
296
 
165
297