Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#61249 new defect (bug)

The character count in the post_excerpt is fine instead of counting words.

Reported by: sarkarripon's profile sarkarripon Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5.3
Component: Posts, Post Types Keywords: dev-feedback needs-testing
Focuses: administration Cc:


It is known that multiple words written without spaces are counted as a single word. This could lead to situations where an excerpt includes a string of characters (which should be separate words) that significantly exceeds the intended limit but is still accepted because it is counted as only one word due to the lack of spaces.

The ultimate goal of imposing a limit on the excerpt is to ensure that it remains concise and to the point. By not accurately counting characters, and thus potentially allowing excerpts to be longer than intended, the system fails to achieve its true purpose. This could affect how excerpts are displayed or how much space they take up on a website or in an admin interface.

Including a character count would provide a more precise and predictable way to limit the length of excerpts. It would ensure consistency regardless of how words are spaced and would give administrators a clear indication of how much text they can include.

Change History (1)

#1 @dmsnell
4 weeks ago

@sarkarripon you may be interested in the wp_trim_excerpt filter which provides you the ability to further limit the generated excerpt, such as if it's longer than you want.

Note: See TracTickets for help on using tickets.