According to the wordpress documentation, the ‘posts_per_page’ option for this function has a default value of 5, meaning you’ll get at most 5 results back. I looked to see if there was a way to show all posts, and I couldn’t find it documented anywhere.

However, I did see some people provide code that had that value set at -1. I thought it might be a way of specifying no limit, so I tried it, and it’s working. Here’s what I use now: