質問編集履歴
5
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -59,6 +59,14 @@
|
|
59
59
|
|
60
60
|
|
61
61
|
?>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
<?php get_template_part('post-list'); ?>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<?php get_template_part('navigator'); ?>
|
62
70
|
|
63
71
|
```
|
64
72
|
|
4
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,9 +24,43 @@
|
|
24
24
|
|
25
25
|
http://minohi.com/wp/564/
|
26
26
|
|
27
|
-
こちらの記事を
|
27
|
+
こちらの記事を拝見しcategory.php一部ソースコードを追記
|
28
28
|
|
29
29
|
|
30
|
+
|
31
|
+
###category.php
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
<?php
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
get_header();
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
$post = $wp_query->post;
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
query_posts('posts_per_page=12&cat=' . get_query_var( 'cat' ));
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
$cat_slug = get_category(get_query_var('cat'))->slug;
|
52
|
+
|
53
|
+
$cat_capital = str_replace('-', ' ', strtoupper($cat_slug));
|
54
|
+
|
55
|
+
$cat_name = get_category(get_query_var('cat'))->name;
|
56
|
+
|
57
|
+
$cat_description = category_description(get_query_var('cat'));
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
?>
|
62
|
+
|
63
|
+
```
|
30
64
|
|
31
65
|
###post-list.php
|
32
66
|
|
3
質問文言修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,6 +17,14 @@
|
|
17
17
|
wp-pagenaviのphpファイルを触る必要があるのでしょうか?
|
18
18
|
|
19
19
|
もしわかるかたがいれば具体的な解決方法を教えていただければ幸いです
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
追記
|
24
|
+
|
25
|
+
http://minohi.com/wp/564/
|
26
|
+
|
27
|
+
こちらの記事を参考に、post-list.phpの<ul>直下に `<?php $paged = get_query_var('paged'); ?>` を追記するも解決せず?
|
20
28
|
|
21
29
|
|
22
30
|
|
2
同様
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,33 +20,11 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
###navigator.php
|
26
|
-
|
27
|
-
```
|
28
|
-
|
29
|
-
<?php
|
30
|
-
|
31
|
-
if (function_exists('wp_pagenavi')) {
|
32
|
-
|
33
|
-
wp_pagenavi();
|
34
|
-
|
35
|
-
}
|
36
|
-
|
37
|
-
?>
|
38
|
-
|
39
|
-
```
|
40
|
-
|
41
|
-
|
42
|
-
|
43
23
|
###post-list.php
|
44
24
|
|
45
25
|
```
|
46
26
|
|
47
27
|
<ul>
|
48
|
-
|
49
|
-
<?php $paged = get_query_var('paged'); ?>
|
50
28
|
|
51
29
|
<?php
|
52
30
|
|
@@ -111,3 +89,23 @@
|
|
111
89
|
|
112
90
|
|
113
91
|
```
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
###navigator.php
|
98
|
+
|
99
|
+
```
|
100
|
+
|
101
|
+
<?php
|
102
|
+
|
103
|
+
if (function_exists('wp_pagenavi')) {
|
104
|
+
|
105
|
+
wp_pagenavi();
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
?>
|
110
|
+
|
111
|
+
```
|
1
post-list.phpを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,4 +40,74 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
+
###post-list.php
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
<ul>
|
48
|
+
|
49
|
+
<?php $paged = get_query_var('paged'); ?>
|
50
|
+
|
51
|
+
<?php
|
52
|
+
|
43
|
-
|
53
|
+
if (have_posts()): while(have_posts()): the_post();
|
54
|
+
|
55
|
+
?>
|
56
|
+
|
57
|
+
<li class="item">
|
58
|
+
|
59
|
+
<dl>
|
60
|
+
|
61
|
+
<a href="<?php the_permalink(); ?>"></a>
|
62
|
+
|
63
|
+
<dt>
|
64
|
+
|
65
|
+
<img src="<?php the_post_thumbnail_url(); ?>">
|
66
|
+
|
67
|
+
<p><?php the_title(); ?></p>
|
68
|
+
|
69
|
+
<div>
|
70
|
+
|
71
|
+
<?php
|
72
|
+
|
73
|
+
$posttags = get_the_tags();
|
74
|
+
|
75
|
+
if ($posttags) {
|
76
|
+
|
77
|
+
foreach($posttags as $tag) {
|
78
|
+
|
79
|
+
echo "<a href=\"" . get_tag_link( $tag->term_id ) . "\" class=\"keyword\">$tag->name</a>";
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
?>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</dt>
|
90
|
+
|
91
|
+
<dd>
|
92
|
+
|
93
|
+
<span><?php the_modified_time('Y.m.d'); ?></span>
|
94
|
+
|
95
|
+
</dd>
|
96
|
+
|
97
|
+
</dl>
|
98
|
+
|
99
|
+
</li>
|
100
|
+
|
101
|
+
<?php
|
102
|
+
|
103
|
+
endwhile; endif;
|
104
|
+
|
105
|
+
wp_reset_query();
|
106
|
+
|
107
|
+
?>
|
108
|
+
|
109
|
+
</ul>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
```
|