NO BUG: Query Loop Offset Functionality Issue in Archive Post Template

I have an archive post template for categories, inside I have three Query Loops configured. The problem is that the Offset functionality is not working for me.

  1. In the first Query Loop I have Offset = 0
  2. In the second Query Loop I have Offset = 1
  3. In the third Query Loop I have Offset = 2

But it doesn’t work, the posts keep repeating and it doesn’t respect the Offset.

1 Like

Hey Luiz,
Thanks so much for your report!

Sounds pretty much like this report, right?

Best regards,
timmse

No, the problem in my case was because:

The Offset doesn’t work because of your Post per page set to -1.

Thanks!

Yeah, that’s true :slight_smile:

  • offset (int) – number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The 'offset' parameter is ignored when 'posts_per_page'=>-1 (show all posts) is used.

Reference:

1 Like