WordPress trims excerpts by counting characters, which means it will happily cut a word in half. You end up with “the project was near comple” trailing off into nowhere. I wrote this so excerpts stop at whole words instead.
What you get
- Drop-in replacement for get_the_excerpt() that returns whole words
- Trims to your chosen length, then backs up to the last complete word instead of slicing through one
- No settings page. It does its one job wherever your theme pulls the excerpt.
Who it’s for
Anyone whose post listings, archive pages, or related-post blocks show automatic excerpts and occasionally cut a word in two. WordPress 5.4 and later handle this better than core once did, but the mid-word cut still shows up in some edge cases, especially with multibyte characters and custom excerpt lengths. If you have never seen a chopped word in your excerpts, you do not need this.
How to install
- Download the ZIP from GitHub.
- Go to Plugins, then Add New, then Upload Plugin.
- Select the ZIP and click Install Now.
- Activate.
Status note
This is an archived plugin. Originally published on WordPress.org, now maintained on GitHub (opens in new tab) and reviewed for security. Still works on current WordPress. No new features planned.
File details
License: GPL-2.0-or-later
Tested with: WordPress 6.7 · PHP 8.1+
Format: .zip
Other downloads from this practice
- HTML5 Search for WordPress. Another small markup improvement.
- Auto Copyright. Set your footer copyright once and forget it.