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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add
Ignore
option to sticky options for Query Loop block #66222Add
Ignore
option to sticky options for Query Loop block #66222Changes from 6 commits
7eaeb8c
03b5e04
1ce1e42
60cb502
2d9c182
ccc2ca9
a1a4394
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 154 in lib/compat/wordpress-6.7/blocks.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we exlude sticky posts? Ignore set below should include them and just list them in their natural order, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 125 doesn't exclude them, it's actually re-including them after core already excluded them. That's what the comment above line 123 is about.
Check failure on line 62 in lib/compat/wordpress-6.8/blocks.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this affect the editor? Shouldn't there be some change to the querying done clientside in the editor too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question.
In the editor, the sticky posts are already bugged on trunk. For example sticky posts do not show as the first posts when the "include" option is set, which is the default. The result in the editor and front already does not match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should at least try to see if we can match the preview in editor. As @carolinan says it's already buggy and if I remember correctly is about what REST API supports how it maps with WP_Query. That's probably the reason (the mapping) for not having this as a separate option for sticky control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore
label is not self explanatory in this context and is quite similar to theexclude
, where it'signore post stickiness
.Maybe a different control can be used with help texts? --cc @jameskoster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps 'Ignore stickiness' is okay for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore stickiness 😂