Category 'posts_per_page' being ignored in query_posts when 'Blog pages show at most' set to 10
|Reported by:||tawilson||Owned by:|
The scenario for this is as follows:
- Using default category base.
- In 'Appearance -> Reading', 'Blog pages show at most' is set to 10.
- The permalink is accessing the category using it's slug name.
- The category is using a custom 'category-slug.php'.
In the custom category, I have the following code, above the call to 'get_header()'.
global $wp_query; query_posts( array_merge( $wp_query->query, array( 'posts_per_page' => 2, 'posts_per_archive_page' => 2 ) ) );
The first page shows 2 posts when the permalink is '/category/slug/'.
However, when the permalink is '/category/slug/page/2/', the query with the 'posts_per_page' set to 10, and as I only have 4 posts, it shows nothing.
If I set 'Blog shows at most' to something other than 10, it obeys my overridden value.