-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Description
The Post Excerpt block is intended to display up first 100 words of an excerpt, as mentioned when first introduced - #44964 (comment)
However, some time since then,
| "default": 55 |
The excerpt block will only display, at most, the first 55 words of a post (the default value of the excerptlength attribute), even if you just adjust the excerpt block's attributes to more than 55.
The excerptLength attribute will correctly display the number of words on the front end if the ExcerptLength attribute value is below 55.
Step-by-step reproduction instructions
- create and publish a few posts of post type post that contain more than 100 words in each post; do NOT set a custom excerpt.
- create a new page
- insert new query block
- include the excerpt in the post template and set the excerpt's attribute to a value above 55. I have a test case here, which assigns the value to 75
- publish page
What happens:
the excerpts that displays on the published page are 55 words. You'll see in the video that this issue occurs within the editor and on the front end.
Note, there is an open pull request to fix this, #61888
Screenshots, screen recording, code snippet
Screencast.from.02-01-2025.06.14.47.PM.webm
Environment info
wp 6.7.1, gutenberg 20.0.1; twentytwentyfive theme
I'm also able to reproduce this issue in my custom hybrid theme as well that does not have gutenberg plugin enabled.
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure