WP:カテゴリーページの記事数を変更したい(任意の数にする)

NO IMAGE

参考サイト様

徹底解説!query_postsを使ってWordPressで表示する記事数をカテゴリごとに変更する(プラグイン不使用)

カテゴリ(category.php)の表示件数を指定する

を参考に、twentytwelveの、category.phpを、コピペでカテゴリーごとに作成
何度も調べるけど忘れる
カテゴリーページの優先順位
(1)category-slug.php
(2)category-id.php
(3)category.php
(4)archive.php
(5)index.php


<?php query_posts($query_string.'&posts_per_page=10'); ?>
↑これより上に
<?php if(have_posts()): while(have_posts()): the_post(); ?>

< ?php the_time('Y.m.d'); ?>
<a href="< ?php the_permalink(); ?>"><?php the_title(); ?></a>

< ?php endwhile; else: ?>
< ?php endif; ?>
↓この下に
< ?php wp_reset_query(); ?>

今更ですけど、
if(have_posts() の時は、<?php endif; ?>で閉じる
while(have_posts  の時は、<?php endif; ?>で閉じる < ?php endwhile; ?>

参考 http://www.bizmemowp.com/wordpress-biz183

WordPressカテゴリの最新記事