Skip to content

Fix "Hide on paginated pages" for loops above an inherited loop - #42

Merged
tomjn merged 1 commit into
mainfrom
fix/hide-on-paged-before-inherited-loop
Oct 27, 2026
Merged

tomjn merged 1 commit into
mainfrom
fix/hide-on-paged-before-inherited-loop

Conversation

@tomjn

@tomjn tomjn commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

A query loop with "Hide on paginated pages" still shows on page 2 onwards when it comes before an inherited loop, for example a featured posts loop above an archive grid. The page number is only read once an inherited loop starts rendering, so any loop rendered before that sees no page number and is never hidden.

The page number is now read the first time any loop needs it, before an inherited loop can change the main query.

The page number was only read once an inherited loop started rendering, so a loop rendered before one was never hidden. Read it the first time any loop needs it.
@tomjn
tomjn requested a review from roborourke October 27, 2026 11:11
@github-actions

Copy link
Copy Markdown

Playwright test results — WP 6.9

passed  26 passed

Details

stats  26 tests across 8 suites
duration  1 minute, 41 seconds
commit  f5292c4

@github-actions

Copy link
Copy Markdown

Playwright test results — WP 7.1

passed  26 passed

Details

stats  26 tests across 8 suites
duration  1 minute, 58 seconds
commit  f5292c4

@github-actions

Copy link
Copy Markdown

Playwright test results — WP 7.0

passed  26 passed

Details

stats  26 tests across 8 suites
duration  1 minute, 53 seconds
commit  f5292c4

@roborourke roborourke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice workaround

@tomjn
tomjn merged commit d578dae into main Oct 27, 2026
8 checks passed
@tomjn
tomjn deleted the fix/hide-on-paged-before-inherited-loop branch October 27, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants