﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
11067,Using query_posts() on any subcategories the attached posts_per_page attribute gets lost,voetzi,,"I have a subcategory containing 9 posts. If this category is showed with the archive.php temlate, i want it to show only one post per page. The default posts per page value in the WP settings is 5. So i build a query this way:

{{{
query_posts( $query_string . '&posts_per_page=1' );
}}}

This works fine for:

http://domain.tld/category/cat/subcat/page/1 and http://domain.tld/category/cat/subcat/page/2

Remember 9 posts in that subcategory and a default posts per page value of 5. If I point my browser to:

http://domain.tld/category/cat/subcat/page/3

I get a ""not found page"" (not a 404) with the search form on it. So i added this code to the searchform.php:

{{{
<?php echo""Query:"". urldecode($query_string;)?>
}}}

The result is: paged=3&category_name=cat/subcat The posts_per_page is missing.

After figured out this, I changed the posts per page in the WP settings to 1 and it worked, as it should. Changing it to 3 it works till page 3 and i have the same effect on page 4. 

This is why it seems to me, that the posts_per_page attributes gets lost during processing and then is overwritten with the default value.  
",defect (bug),closed,normal,,General,2.8.5,normal,wontfix,,
