How can I allow sticky posts but cap the query to 1 post?
Here’s a way to force the exact posts_per_page value in WP_Query, regardless of sticky posts or custom post injects: $args = [ ‘posts_per_page’ => 1, ‘_exact_posts_per_page’ => true // <– our custom input argument ]; by using our custom _exact_posts_per_page input argument. I’m sure this has been implemented many times before, but I didn’t find … Read more