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.

Is it only me or this is what's happening?

I just want to get all posts starting from a certain offset, like 10. Instead I get all posts starting from the 0.

share|improve this question
    
Same behvaior here. Havn't found any notice about in the codex so far. –  rofflox Jul 3 '11 at 14:46
add comment

1 Answer

up vote 2 down vote accepted

posts_per_page => -1 is equivalent to 'nopaging' => true, which basically means no LIMIT clause is used at all.

The workaround is to set posts_per_page to a large number.

This is a limitation of the LIMIT syntax itself:

http://dev.mysql.com/doc/refman/5.0/en/select.html

share|improve this answer
1  
ok, I'll just substract my offset from found_posts from the previous query and pass it as post_per_page in the next one –  onetrickpony Jul 3 '11 at 14:53
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.