#62908 closed enhancement (fixed)
Editor: Add option to ignore sticky posts in Query block
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | gutenberg-merge has-patch has-unit-tests add-to-field-guide has-testing-info commit |
Focuses: | Cc: |
Description
Introduce a new ignore
value for the sticky
query argument. When this value is used, the query won't prepend sticky posts at the top; instead, it will display them in the natural order of the query.
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/69057.
Attachments (5)
Change History (18)
This ticket was mentioned in PR #8265 on WordPress/wordpress-develop by @Mamaduka.
6 weeks ago
#1
- Keywords has-patch added
#2
@
6 weeks ago
Test Report
This report confirms the functionality of the patch provided.
Tested Patch: https://github.com/WordPress/wordpress-develop/pull/8265
Environment
OS: Windows 11
Web Server: WordPress Playground
PHP: Playground Default
WordPress Version: 6.8-alpha-20250125.203533
Browser: Chrome
Theme: Twenty Twenty-Five v1.0
Active Plugins: None
Actual Results
✅ Front-end behavior: The patch resolved the issue successfully.
❌ Backend behavior: When sticky posts are selected to be included, the query does not prepend sticky posts at the top, instead displaying them in the natural order of the query.
#3
@
6 weeks ago
Hi @mikinc860
Thank you for testing. The result that you are seeing is caused by a different bug.
The control to ignore the sticky post has not been added to the block yet. The new option can only be tested once the JavaScript has been added as part of a package update.
@Mamaduka commented on PR #8265:
4 weeks ago
#4
Thanks for pushing the tests, @peterwilsoncc 🙇
@audrasjb commented on PR #8265:
4 weeks ago
#5
Appart from the couple wpcs issues reported by Peter this looks good to me 👍 Concerning the post__not_in
specific concern, this will need to be documented at least in a dev note, but I think an inline comment somewhere would be ideal.
#7
@
4 weeks ago
@audrasjb, what type of dev note do you have in mind? Should I combine all sticky post-related updates in a single dev note?
@Mamaduka commented on PR #8265:
4 weeks ago
#8
@peterwilsoncc, @audrasjb let me know if this is good to commit.
#9
@
4 weeks ago
- Keywords add-to-field-guide added
@Mamaduka this, or put a section in one of the editor related dev note. Maybe you have a "Block Change" dev note in mind?
Otherwise, we can also just add a section to the general Field Guide. Adding the add-to-field-guide
keyword just in case :)
#10
@
3 weeks ago
- Keywords has-testing-info added; needs-dev-note removed
Test Report
This report confirms the functionality of the patch provided.
Tested Patch: https://github.com/WordPress/wordpress-develop/pull/8265
Environment
OS: Windows 11
Web Server: WordPress Playground
PHP: Playground Default
WordPress Version: 6.8-alpha-20250125.203533
Browser: Chrome
Theme: Twenty Twenty-Five v1.0
Active Plugins: None
Actual Results
✅ Front-end behavior: The patch resolved the issue successfully.
✅ Backend behavior: The patch resolved the issue successfully.
#11
@
3 weeks ago
- Keywords commit added
- Owner set to Mamaduka
- Status changed from new to assigned
Marking this for commit
based on PR approvals from @audrasjb and @peterwilsoncc. @Mamaduka I've set you as the assignee but feel free to reassign if someone else intends to commit this.
Introduce a new
ignore
value for thesticky
query argument. When this value is used, the query won't prepend sticky posts at the top; instead, it will display them in the natural order of the query.Related: https://github.com/WordPress/wordpress-develop/pull/8228
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/69057
Trac ticket: https://core.trac.wordpress.org/ticket/62908#ticket