Viewing 5 replies - 1 through 5 (of 5 total)
  • You could create different category templates and then, just before the Loop in each template, add something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'posts_per_page' => 6,
    	'paged' => $paged
    );
    query_posts($args);
    ?>
    Thread Starter lowspeed2000

    (@lowspeed2000)

    Well i’m doing something like this before the loop:

    query_posts('category_name=features&posts_per_page=5');

    It works but next pages show the same stuff the the first page shows …

    Any idea why ?

    Thread Starter lowspeed2000

    (@lowspeed2000)

    Your method shows all categories plus it break the wp_pagenavi plugin

    Thread Starter lowspeed2000

    (@lowspeed2000)

    i ended up doing this:

    global $query_string;
    
    	if ($category[0]->cat_ID==4)  query_posts($query_string . '&category_name=cat1&posts_per_page=5'); else
    	if ($category[0]->cat_ID==3)  query_posts($query_string . '&category_name=cat2&posts_per_page=5'); else
        if ($category[0]->cat_ID==5)  query_posts($query_string . '&category_name=cat3&posts_per_page=10');
    
    	while (have_posts()) : the_post(); 
    
    ..........
    Thread Starter lowspeed2000

    (@lowspeed2000)

    missed this before:

    $category = get_the_category();

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Customize how many posts show for each category’ is closed to new replies.