-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Latest Posts: Make Latest Posts block consistent with sticky posts display #69428
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
Latest Posts: Make Latest Posts block consistent with sticky posts display #69428
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
The sticky posts are not sticky anymore and the sorting is also working well, thank you.
…splay (#69428) Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: carolinan <poena@git.wordpress.org>
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: bc06abf |
…splay (WordPress#69428) Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: carolinan <poena@git.wordpress.org>
What?
Closes #69424
This PR addresses the inconsistency between how the Latest Posts block displays posts in the editor versus the front end. Previously, sticky posts would always appear at the top of the list in the editor, regardless of the sorting parameters, but would display in their chronological position on the front end.
The fix adds the
ignore_sticky: true
parameter to the post query in the editor, ensuring that sticky posts are treated the same in both contexts. They are displayed according to the selected ordering parameters rather than being prioritized at the top.Why?
The Latest Posts block should respect the specified ordering parameters and display posts consistently between the editor and the front end. The current inconsistency creates a confusing user experience where what users see in the editor doesn't match what visitors see on the published page.
How?
This PR adds the
ignore_sticky: true
parameter to the query in the Latest Posts block's editor component.Testing Instructions
Screencast
Screen.Recording.2025-03-05.at.15.28.10.mov