function.phpに追加
/** * 表示件数制御 */ function change_posts($query){ if(!is_admin() && $query->is_main_query()){ if ( $query->is_category( array(7,13,14))) { //カテゴリ 7 13 14 のみ $query->set('posts_per_page', 20); //20件表示 } } } add_action('pre_get_posts', 'change_posts');