Opened 6 years ago
Closed 8 months ago
#51268 closed defect (bug) (wontfix)
Issue with excerpts
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 5.5.1 |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
This is a follow-up to #51042.
Hope this is the correct place to report this. Regarding 50142, I have several customer sites (at least 50) in which we type a space in the Excerpt field in order for an Excerpt not to display. It displays the space, which is invisible. But with your change above, WordPress 5.5.1 is ignoring the typed space and displaying the excerpts, which we do not want. I'm going to have about 50 customers ask me how to fix this over the next few weeks when they start to notice the issue. If I type the code for a non-breaking space, the issue goes away but they'd have to manually adjust this on all posts. Can this be adjusted so that WordPress still recognizes a typed space as a single character excerpt? Thank you. I also posted on the WordPress forum at https://wordpress.org/support/topic/odd-issue-with-excerpts/#post-13378581
Change History (1)
#1
in reply to:
↑ description
@
8 months ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
There are a million ways to avoid excerpts with a little code. The space trick was not intended, and the fact that it happened to work was not a feature but somehat bug.
I have not tested, but checking at the code, I think that something like
remove_filter('the_excerpt', 'wp_trim_excerpt');(for example in your theme'sfunctions.php) shoud make your space trick work again.But ideally the best thing to do is to actually manipulate the excerpts display to your convenience
There are plenty of hooks to the excerpt like
get_the_excerptif you want to manipulate it conditionally, orthe_excerptif you want to simply replace it for example.Closing this as
wontfixthe space thing should not be happening anymore, with all these options available.