[wp-hackers] showposts/posts_per_page bug?

Gavin Pearce Gavin.Pearce at 3seven9.com
Mon Dec 6 10:33:43 UTC 2010


Just flicked onto the list to post the same question. 

Also seeing the same bug:
$resources = get_posts(array('post_type' => 'tsn_resource',
'posts_per_page' => '-1'));
returns only 5 items out of a possible 50ish.

As I need all posts, I can get it to work by running:
$resources = get_posts(array('post_type' => 'tsn_resource',
'posts_per_page' => '-1', 'nopaging' => true));

G


-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Simon
Blackbourn
Sent: 05 December 2010 22:03
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] showposts/posts_per_page bug?

>
> It's a bug. Fixed in 3.1.
>
>
great news, thanks for the update.
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list