I notice that sticky posts will disregard the posts_per_page param? Like I have a query like

$q = new WP_Query(array( 'posts_per_page' => 4, ... ));

If there are 3 sticky posts, I will get 6 posts? (its abit strange tho why 6 not 7 (4+3)) I dont want to ignore sticky posts. How can I force the posts per page limit? eg, I have 10 sticky, I still get only 4 posts.

One way I can think of is a counter that counts to 4 and exit the loop. But there isnt a WP way? This appears to be more of a bug to me?

0

Leave a Reply

Your email address will not be published. Required fields are marked *