-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 ] Fixes the read more link added by themes in Latest Posts #20541
Conversation
Size Change: 0 B Total Size: 864 kB ℹ️ View Unchanged
|
Thanks for the PR and as much as I don't want to unnecessarily block progress (and your PR solves original issue), this PR introduces a new regression: Gutenberg now ignores the excerptLength that is configured by the user within the block's inspector control. The excerpt length on the front end (the render block viewed by the user) is now always 55, the default for an excerpt regardless what the user sets in the block's inspector control/panel. |
cdeee6f
to
4890389
Compare
hi there @skorasaurus after a rebase the fix in master is in this PR as well. The length is now respected via a new filter used at render time in the |
4890389
to
f08af5c
Compare
Thanks, I confirm the read more links are fixed as well as the excerptLength that is defined by the user in the block editor. Thank you for your contribution. |
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.
@draganescu and I had a discussion about this change, so just replicating my thoughts here.
This change does alter the behavior of the block (in addition to fixing the bug), so worth documenting that.
The block's output in the post now respects the excerpt_more
filter, so for some themes this improves things. It also introduces consistency, so the excerpts produced by the block match those elsewhere on the site.
However, the way the block appears in the editor is now inconsistent with what's displayed in the post. Additionally, some themes that don't use excerpt_more
will find that the 'Read more' link is no longer present (e.g. Twenty Twenty, although worth mentioning that this is consistent with the rest of the site).
I don't think there's a win win situation in solving this bug, so I'm approving this, but it'd be good to look at how the editor version of the block can be made consistent with the post in a follow-up.
Thank you @talldan for the summary! |
Description
Closes #20511
How has this been tested?
Screenshots
Types of changes
Non breaking changes in
LatestPosts
front end rendering.