Description
I'm filing this as a bug because it should have been implemented from the start to be on-par with WP_Query parameters. Currently there are options:
Include: default behavior where sticky posts are prepended to returned posts
Exclude: all sticky posts are excluded
Only: only sticky posts are included
There should be a final option:
Ignore: sticky posts are included in their natural order (basically as if they were not sticky)
This would simply set 'ignore_sticky_posts' => true in the query.
This is very useful for building a "Recent posts" list where we just want most recent regardless of sticky or not.
Reference: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/query/edit/inspector-controls/sticky-control.js
Step-by-step reproduction instructions
- Add Query Loop block
- Notice you cannot ignore sticky posts
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 6.6.2
- Gutenberg trunk
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Description
I'm filing this as a bug because it should have been implemented from the start to be on-par with
WP_Queryparameters. Currently there are options:Include: default behavior where sticky posts are prepended to returned posts
Exclude: all sticky posts are excluded
Only: only sticky posts are included
There should be a final option:
Ignore: sticky posts are included in their natural order (basically as if they were not sticky)
This would simply set
'ignore_sticky_posts' => truein the query.This is very useful for building a "Recent posts" list where we just want most recent regardless of sticky or not.
Reference: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/query/edit/inspector-controls/sticky-control.js
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.