WP_Query doesn’t return some child pages even though the database shows them

Red faced – but happy to share the results and save someone else the pain. I have been chasing a ghost for the last two days, there is a default number of posts the wp_query returns which is page specific. It seems to be set to 10 posts on the page I am on.

All you have to do is specify the number of posts you want to override the default values. In my case I wanted them all so I added the following to the query args.

'posts_per_page' => -1

I really hope this helps someone, dark couple of days and I was starting to incorrectly point fingers at plugins that were behaving just fine.

Found this out at wp query to get child pages of current page