質問編集履歴
5
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,6 +29,10 @@
|
|
29
29
|
$cat_description = category_description(get_query_var('cat'));
|
30
30
|
|
31
31
|
?>
|
32
|
+
|
33
|
+
<?php get_template_part('post-list'); ?>
|
34
|
+
|
35
|
+
<?php get_template_part('navigator'); ?>
|
32
36
|
```
|
33
37
|
###post-list.php
|
34
38
|
```
|
4
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,8 +11,25 @@
|
|
11
11
|
|
12
12
|
追記
|
13
13
|
http://minohi.com/wp/564/
|
14
|
-
こちらの記事を
|
14
|
+
こちらの記事を拝見しcategory.php一部ソースコードを追記
|
15
15
|
|
16
|
+
###category.php
|
17
|
+
```
|
18
|
+
<?php
|
19
|
+
|
20
|
+
get_header();
|
21
|
+
|
22
|
+
$post = $wp_query->post;
|
23
|
+
|
24
|
+
query_posts('posts_per_page=12&cat=' . get_query_var( 'cat' ));
|
25
|
+
|
26
|
+
$cat_slug = get_category(get_query_var('cat'))->slug;
|
27
|
+
$cat_capital = str_replace('-', ' ', strtoupper($cat_slug));
|
28
|
+
$cat_name = get_category(get_query_var('cat'))->name;
|
29
|
+
$cat_description = category_description(get_query_var('cat'));
|
30
|
+
|
31
|
+
?>
|
32
|
+
```
|
16
33
|
###post-list.php
|
17
34
|
```
|
18
35
|
<ul>
|
3
質問文言修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,6 +9,10 @@
|
|
9
9
|
wp-pagenaviのphpファイルを触る必要があるのでしょうか?
|
10
10
|
もしわかるかたがいれば具体的な解決方法を教えていただければ幸いです
|
11
11
|
|
12
|
+
追記
|
13
|
+
http://minohi.com/wp/564/
|
14
|
+
こちらの記事を参考に、post-list.phpの<ul>直下に `<?php $paged = get_query_var('paged'); ?>` を追記するも解決せず?
|
15
|
+
|
12
16
|
###post-list.php
|
13
17
|
```
|
14
18
|
<ul>
|
2
同様
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,20 +9,9 @@
|
|
9
9
|
wp-pagenaviのphpファイルを触る必要があるのでしょうか?
|
10
10
|
もしわかるかたがいれば具体的な解決方法を教えていただければ幸いです
|
11
11
|
|
12
|
-
|
13
|
-
###navigator.php
|
14
|
-
```
|
15
|
-
<?php
|
16
|
-
if (function_exists('wp_pagenavi')) {
|
17
|
-
wp_pagenavi();
|
18
|
-
}
|
19
|
-
?>
|
20
|
-
```
|
21
|
-
|
22
12
|
###post-list.php
|
23
13
|
```
|
24
14
|
<ul>
|
25
|
-
<?php $paged = get_query_var('paged'); ?>
|
26
15
|
<?php
|
27
16
|
if (have_posts()): while(have_posts()): the_post();
|
28
17
|
?>
|
@@ -54,4 +43,14 @@
|
|
54
43
|
?>
|
55
44
|
</ul>
|
56
45
|
|
46
|
+
```
|
47
|
+
|
48
|
+
|
49
|
+
###navigator.php
|
50
|
+
```
|
51
|
+
<?php
|
52
|
+
if (function_exists('wp_pagenavi')) {
|
53
|
+
wp_pagenavi();
|
54
|
+
}
|
55
|
+
?>
|
57
56
|
```
|
1
post-list.phpを追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,4 +19,39 @@
|
|
19
19
|
?>
|
20
20
|
```
|
21
21
|
|
22
|
+
###post-list.php
|
23
|
+
```
|
24
|
+
<ul>
|
25
|
+
<?php $paged = get_query_var('paged'); ?>
|
26
|
+
<?php
|
22
|
-
|
27
|
+
if (have_posts()): while(have_posts()): the_post();
|
28
|
+
?>
|
29
|
+
<li class="item">
|
30
|
+
<dl>
|
31
|
+
<a href="<?php the_permalink(); ?>"></a>
|
32
|
+
<dt>
|
33
|
+
<img src="<?php the_post_thumbnail_url(); ?>">
|
34
|
+
<p><?php the_title(); ?></p>
|
35
|
+
<div>
|
36
|
+
<?php
|
37
|
+
$posttags = get_the_tags();
|
38
|
+
if ($posttags) {
|
39
|
+
foreach($posttags as $tag) {
|
40
|
+
echo "<a href=\"" . get_tag_link( $tag->term_id ) . "\" class=\"keyword\">$tag->name</a>";
|
41
|
+
}
|
42
|
+
}
|
43
|
+
?>
|
44
|
+
</div>
|
45
|
+
</dt>
|
46
|
+
<dd>
|
47
|
+
<span><?php the_modified_time('Y.m.d'); ?></span>
|
48
|
+
</dd>
|
49
|
+
</dl>
|
50
|
+
</li>
|
51
|
+
<?php
|
52
|
+
endwhile; endif;
|
53
|
+
wp_reset_query();
|
54
|
+
?>
|
55
|
+
</ul>
|
56
|
+
|
57
|
+
```
|