get_posts not pull all posts unless &numberposts= in query
-
Hi
I’ve just ran into an issue with WordPress 3.1.3 install. I’m pulling out all posts from a particular category in random order, all good.
$postslist = get_posts('orderby=rand&cat=24');However I’d realised it wasn’t pulling all the posts – only the latest 5. To ‘fix’ it I added the &numberposts= query to the string and now it works as it should.
$postslist = get_posts('orderby=rand&cat=24&numberposts=');Is this a bug or is there a default number of posts? Or is it related to the Reading Settings? (Which was set to 6 anyway?)
Cheers
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘get_posts not pull all posts unless &numberposts= in query’ is closed to new replies.