Different number of posts in each category

As @StephenHarris pointed out there’s also the pre_get_posts filter.

function hwl_home_pagesize( $query ) 
{
    if ( is_category( 9 ) ) 
    {
        // If you want "posts per page"
        $query->query_vars['posts_per_page'] = 1;
        return;
    }
    if ( is_category( 'movie' ) )
    {
        // If you want "showposts"
        $query->query_vars['showposts'] = 50;
        return;
    }
}
add_action( 'pre_get_posts', 'hwl_home_pagesize', 1 );

Example altered from Codex example.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)