Skip to content

Regression: post excerpt block's excerptLength attribute is ignored, excerpt length is always limited to 55. #68996

@skorasaurus

Description

@skorasaurus

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,

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

  1. 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.
  2. create a new page
  3. insert new query block
  4. 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
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Post ExcerptAffects the Post Excerpt Block[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions