SOLVED: Pagination not working on Main Query with offset

Browser: Chrome 110
OS: Windows
URL: Not yet live
Video: Can record the site

Hi, how can I make it, so this post category archive template could use two queries? This is how the layout should look like. The first post section is the most recent one, it uses a custom query. For the post grid, I’ve tried adding an offset of 1, it works but when I go to page 2 it will still show me the same posts as on page 1. Post 1 should remain the same on all pages. Are there any issues in Bricks if you have two queries on the same template? Any idea how to make it work?

Have you checked the “is main query” in the query loop setting?

Yes, I’ve set the post grid as the main query. The first section post (most recent post) has its own query.

Please check if you’ve enabled the following settings on your post grid loop
Screenshot 2023-12-04 192333

Yes, I have those settings applied to my post grid loop.

These are the settings for the most recent post loop

2023-12-04_13-27_1

The template structure

Sorry to reply several times, the forum doesn’t allow me to add more than 1 image per reply.

The pagination settings

2023-12-04_13-30_1

Hm, ok, I think it’s possible to post several images in one post but doesn’t matter. Ok. Your settings seem alright. I’m not sure but may have a look at this post NO BUG: Query Loop Offset Functionality Issue in Archive Post Template - #3 by emprebit as there seems to be a problem when using offset and pagination. Please try without offset, if pagination works then.

Disabling offset on the post grid fixes the issue, but the most recent post will be updated to be Post 2 on the next page, and I need that to be always Post 1.

Any idea on how can I make the post grid work without affecting the most recent post?

What if you check “disable query merge” also on the first loop?

Having “disable query merge” on my first loop works. But in the post grid, the offset breaks the loop. If I go to page 2 the results on my post grid do not update.

Hi @henrymendeez ,

This should be the correct setup if this is an archive page.

I would change this thread category to “How to”

Regards,
Jenn

Hi @itchycode, that is how I have set up the queries. The most recent post remains the same on page 2, but the post grid doesn’t update.

Please take a look at this video: https://www.loom.com/share/303fd214efed421a8e8e74ac4e872e50?sid=3dd73528-979f-4db1-a479-c334042fc084

The setup:

Hi @henrymendeez ,

Kindly email your website credentials to help@bricksbuilder.io and include this forum thread as a reference

I will check that out.

Thanks.

Regards,
Jenn

Same Issue with same settings, any update of how to solve that?

Hi @alfredo49 ,

I can confirmed it is a bug when using offset on Main Query.
Already recorded in the bug tracker. We are working on it :slight_smile:

Regards,
Jenn

1 Like

Hi!

Has been resolved in Bricks 1.10.2?

Reading the changelog:

  • Main Query with offset value: Pagination always returning same result [FIX]

Someone can confirm that?

Hi guys,

We’ve fixed this issue in Bricks 1.10.2, now available as a one-click update in your WordPress Dashboard.

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.10.2 Changelog – Bricks

Best regards,
M

This is still not fixed, and still displaying the same behaviour. I currently have 1.10.3 installed.