1

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.

  • Same behvaior here. Havn't found any notice about in the codex so far. – rofflox Jul 3 '11 at 14:46
4

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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