WP_Query issues with argument posts_per_page

Try to add

'post_type' => 'any', 
'post_stauts' => 'any', 

to your arguments and see what happens. This should retrieve posts in all post types with any post status. If it only retrieves 252 posts, then the other posts doesn’t not meet your criteria in your query.

The other important thing is that with such an amount of posts, you might exceed the maximum execution time to retrieve these posts, but this will result in an error.

You should also set your debug to true in wp-config.php, and check this way if any error is returned. Check out Debugging WordPress


Your problem is quite actually simple and expected behavior. When running a custom query and directly after that run another custom query, or even using main query, it is expected that the first query will break the second query if you do not reset the custom query.

It is of utmost importance that any custom query made with WP_Query or get_posts that you reset the postdata first before running another query. This is done with wp_reset_postdata().

Use this function to restore the global $post variable of the main query loop after a secondary query loop using new WP_Query. It restores the $post variable to the current post in the main query.

To solve your issue, simply add wp_reset_postdata(); just before the last endif;