posts_per_page, bizarre behaviour?
-
I have the following, at the top of a custom category page in my theme (i.e. category-slug.php) before the ‘get_header();’ call:
<?php global $wp_query; query_posts( array_merge( $wp_query->query, array( 'posts_posts' => '1' ) ) ); ?>
When I’m viewing the page ‘https://site/category/slug’ it only shows 1 page.
But for some reason, when it goes onto page 2 ‘https://site/category/slug/page/2’ the query contains ‘posts_per_page’ set to ’10’ (10 being my default) and therefore misses the rest of my posts, as it has offset at 10. ??
Why on earth would it do this, I have no sticky posts, just 4 posts in that category. Any help would be greatly appreciated as this is really annoying me.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘posts_per_page, bizarre behaviour?’ is closed to new replies.