Debugging pagination for a custom WordPress query – the “posts_per_page” value must match the value of “Blog pages show at most” under Settings > Reading, in the admin dashboard, else the last page in the pagination chain will break. If anyone knows how to programmatically avoid this issue drop it in a comment. Thanks