Repository navigation
Fix "Hide on paginated pages" for loops above an inherited loop - #42
Merged
Merged
Conversation
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.
Playwright test results — WP 6.9Details
|
Playwright test results — WP 7.1Details
|
Playwright test results — WP 7.0Details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.