through a filter in [cci]functions.php[/cci] file:
[code]add_filter(’pre_get_posts’, 'Per_category_basis’);
function Per_category_basis($query){
if ($query->is_category) {
// category named 'books’ show 12 posts
if (is_category(’books’){
$query->set(’posts_per_page’, 12);
}
// category With ID = 32 show only 5 posts
if (is_category(’32’){
$query->set(’posts_per_page’, 5);
}
}
return $query;
}[/code]
inline in the right template file
[code]global $query_string;
query_posts(„{$query_string}&posts_per_page=5”);[/code]