Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am doing this query

$args = array(
'posts_per_page' => '-1',
'post_type' => 'custom_post_type',
'post_status' => 'publish'
);

query_posts( $args );

but it is not working

I have around 800 posts in that custom type and the query_posts function is working just if posts_per_page < 519. I know is weird but if I do this

$args = array(
'posts_per_page' => '518', //or any lower number
'post_type' => 'custom_post_type',
'post_status' => 'publish'
);

query_posts( $args );

it does work but not with

$args = array(
'posts_per_page' => '519', //or bigger
'post_type' => 'custom_post_type',
'post_status' => 'publish'
);

query_posts( $args );

Any suggestion???

Thanks

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.