質問編集履歴
1
書式の改善
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -22,19 +22,22 @@
|
|
|
22
22
|
ソースコードの問題ではないと思っていますが記載します。
|
|
23
23
|
|
|
24
24
|
page.php
|
|
25
|
-
|
|
25
|
+
```ここに言語を入力
|
|
26
26
|
<?php $cat_id = get_cat_ID( get_the_title() );if ( $cat_id ) {$args = array('posts_per_page' => 10,'category' => $cat_id,);$posts = get_posts( $args );} foreach ( $posts as $post ): setup_postdata( $post ); ?>
|
|
27
27
|
|
|
28
28
|
<p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
|
|
29
29
|
|
|
30
30
|
<?php endforeach; wp_reset_postdata(); ?>
|
|
31
31
|
|
|
32
|
+
```
|
|
32
33
|
|
|
33
34
|
single.php
|
|
35
|
+
```ここに言語を入力
|
|
34
36
|
|
|
35
37
|
<?php if(have_posts()): while(have_posts()):the_post(); ?>
|
|
36
38
|
<?php the_content(); ?>
|
|
37
39
|
<?php endwhile; endif; ?>
|
|
40
|
+
```
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
### 試したこと
|