質問編集履歴
1
文字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
WordPressで記事サイトを作成しております。
|
2
2
|
|
3
3
|
|
4
|
+
|
5
|
+
Poup Makerというプラグインを使用しています。
|
4
6
|
|
5
7
|
記事の一覧ページでは<?php the_excerpt(); ?>で抜粋表示にして、
|
6
8
|
|
@@ -10,4 +12,58 @@
|
|
10
12
|
|
11
13
|
|
12
14
|
|
15
|
+
single.phpにこのような記述をし
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
```ここに言語を入力
|
20
|
+
|
21
|
+
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
22
|
+
|
23
|
+
<section class="content">
|
24
|
+
|
25
|
+
<?php the_excerpt(); ?>
|
26
|
+
|
27
|
+
</section>
|
28
|
+
|
29
|
+
<?php endwhile; endif; ?>
|
30
|
+
|
31
|
+
```
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
functions.phpに
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
```ここに言語を入力
|
40
|
+
|
41
|
+
function inc11_excerpt_more($post) {
|
42
|
+
|
43
|
+
return '...';
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
add_filter('excerpt_more', 'inc11_excerpt_more');
|
48
|
+
|
49
|
+
function inc11_wp_trim_excerpt($excerpt) {
|
50
|
+
|
51
|
+
global $post;
|
52
|
+
|
53
|
+
return $excerpt.'<a href="'.get_permalink($post->ID).'" class="more-link">続きを読む</a>';
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
add_filter('wp_trim_excerpt', 'inc11_wp_trim_excerpt');
|
58
|
+
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
このように記述したのですが、
|
64
|
+
|
65
|
+
続きを読むための振り分けの方法がわかりません。
|
66
|
+
|
67
|
+
|
68
|
+
|
13
69
|
よろしくお願いいたします。
|